<template>
    <pageTabelLayout>
        <template #pageHeader>
            <div class="search-form" v-if="headerShow">
                <a-form size="small" :model="pageData" layout="inline" label-align="right" :label-col-props="{ span: 8 }"
                    :wrapper-col-props="{ span: 16 }">
                    <a-form-item label="布号" :style="{ width: '345px' }" label-col-flex="100px">
                        <a-input class="bacClass" v-model="dataForm1.clothCode" @press-enter="huiche" allow-clear
                            style="width:200px"></a-input>
                    </a-form-item>
                    <a-form-item label="品名" :style="{ width: '345px' }" label-col-flex="100px">
                        <a-input class="bacClass" v-model="dataForm1.brandName" @press-enter="huiche" allow-clear
                            style="width:200px"></a-input>
                    </a-form-item>
                    <a-form-item label="客户名称" :style="{ width: '345px' }" label-col-flex="100px">
                        <a-input class="bacClass" v-model="dataForm1.customName" @press-enter="huiche" allow-clear
                            style="width:200px"></a-input>
                    </a-form-item>
                    <a-form-item label="客户布号" :style="{ width: '345px' }" label-col-flex="100px">
                        <a-input class="bacClass" v-model="dataForm1.customClothCode" @press-enter="huiche" allow-clear
                            style="width:200px"></a-input>
                    </a-form-item>
                    <a-form-item label="布类" :style="{ width: '345px' }" label-col-flex="100px">
                        <a-input class="bacClass" v-model="dataForm1.clothType" @press-enter="huiche" allow-clear
                            style="width:200px"></a-input>
                    </a-form-item>
                    <a-form-item label="面料类别" :style="{ width: '345px' }" label-col-flex="100px">
                        <a-input class="bacClass" v-model="dataForm1.fabricType" @press-enter="huiche" allow-clear
                            style="width:200px"></a-input>
                    </a-form-item>
                    <a-form-item label="开单日期" :style="{ width: '345px' }" label-col-flex="100px">
                        <a-date-picker  popup-container="html"  class="bacClass" v-model="dataForm1.beginDate" @press-enter="huiche" allow-clear
                            style="width:200px" />
                    </a-form-item>
                    <a-form-item label="至" field="dateEnd" :style="{ width: '345px' }" label-col-flex="100px">
                        <a-date-picker  popup-container="html"  class="bacClass" v-model="dataForm1.endDate" @press-enter="huiche" allow-clear
                            style="width:200px" />
                    </a-form-item>
                </a-form>
            </div>
            <div class="my-tool-bar">
                <Toolbar style="float:right" v-if="isIDs == 1" :items="['查询', '新增', '删除', '审核']" @add="addHandler"
                    @del="deleteHandler" @select="selectHandler" @audit="audits">
                </Toolbar>
                <Toolbar style="float:right" v-else :items="['查询', '反审']" @select="selectHandler1" @counter="counters">
                </Toolbar>
            </div>
            <div class="my-divisders">
                <a-divider orientation="center">
                    <icon-double-up v-if="headerShow" @click="headerShow = false" :strokeWidth="2" :size="18" />
                    <icon-double-down v-else @click="headerShow = true" :strokeWidth="2" :size="18" />
                </a-divider>
            </div>
        </template>
        <template #pageTabel>
            <!-- 主表 -->
            <a-tabs   :lazy-load="true" :justify="true" @change="changeTabs">
                <a-tab-pane title="待审核" :key="1">
                    <AgGridVuesCopys :rowHeight="33" :headerHeight="33" :suppressCopyRowsToClipboard="true" rowSelection="multiple" @grid-ready="gridReady"
                        style="height:100%" :defaultColDef="defaultColDef" class='ag-theme-alpine' :rowData="table.dataList"
                        :columnDefs="tc" :localeText="localeText1"></AgGridVuesCopys>
                    <paginationCopys :page-size-options="pagingList1" :total="total" show-total show-jumper show-page-size
                        @change="PageSize" @page-size-change="change1" style="justify-content: center"
                        :page-size="pagination.pageSize" :current="pagination.page" />
                </a-tab-pane>
                <a-tab-pane title="已审核" :key="2">
                    <AgGridVuesCopys :rowHeight="33" :headerHeight="33" :suppressCopyRowsToClipboard="true" rowSelection="multiple" @grid-ready="gridReady1"
                        style="height:100%" :defaultColDef="defaultColDef1" class='ag-theme-alpine'
                        :rowData="table.dataList" :columnDefs="dc" :localeText="localeText1"></AgGridVuesCopys>
                    <paginationCopys :page-size-options="pagingList1" :total="total1" show-total show-jumper show-page-size
                        @change="PageSize" @page-size-change="change1" style="justify-content: center"
                        :page-size="pagination1.pageSize" :current="pagination1.page" />
                </a-tab-pane>
            </a-tabs>
        </template>

        <!-- 主表抽屉 -->
        <a-drawer :drawer-style="{ 'zIndex': 9999 }" :mask-closable="false" height="100%" :visible="pageData.showAdd8"
            unmountOnClose @ok="submitUpload" @cancel="pageData.showAdd8 = false" cancel-text='关闭' ok-text='保存'
            placement="bottom">
            <template #title>
                {{ pageData.sideTitle }}
            </template>
            <div style="min-width:1500px;">
                <div>
                    <a-form ref="formRef" size="small" :model="objectOP" layout="inline" label-align="right">
                        <a-form-item label="登记号" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" v-model="objectOP.registerCode" disabled></a-input>
                        </a-form-item>
                        <a-form-item label="客户名称" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-select popup-container="html"  class="bacClass" :loading="loading" :allowClear="true" @search="handleSearchKHMC"
                                v-model="objectOP.customName" :filter-option="false" allow-search @focus="focusSelKHMC">
                                <a-option v-for="item in pageData.nameOpenKHMC" :value="item['customName']">{{
                                    item['customName']
                                }}</a-option>
                            </a-select>
                        </a-form-item>
                        <a-form-item :style="{ width: '345px' }" label-col-flex="100px" label="登记日期"
                            :validate-trigger="['change', 'blur']" :rules="[{ required: true, message: '登记日期必填' }]"
                            field="registerDate">
                            <a-date-picker  popup-container="html"  :style="{ width: '229px' }" class="bacClass" v-model="objectOP.registerDate" />
                        </a-form-item>
                        <a-form-item :style="{ width: '345px' }" label-col-flex="100px" label="面料状态"
                            :validate-trigger="['change', 'blur']" :rules="[{ required: true, message: '面料状态必填' }]"
                            field="fabricState">
                            <a-select popup-container="html"  class="bacClass" :loading="loading" :allowClear="true" v-model="objectOP.fabricState"
                                :filter-option="false" allow-search>
                                <a-option :value="1">开发面料</a-option>
                                <a-option :value="2">成品面料</a-option>
                            </a-select>
                        </a-form-item>
                        <a-form-item :style="{ width: '345px' }" label-col-flex="100px" label="布类">
                            <a-select popup-container="html"  class="bacClass" :loading="loading" :allowClear="true" @search="handleSearchopen2"
                                v-model="objectOP.clothType" :filter-option="false" allow-search @focus="focusSelopen2">
                                <a-option v-for="item in pageData.nameOpen2" :value="item['mercery']">{{
                                    item['mercery']
                                }}</a-option>
                            </a-select>
                        </a-form-item>
                        <a-form-item :style="{ width: '345px' }" label-col-flex="100px" label="布种分类">
                            <a-select popup-container="html"  class="bacClass" :loading="loading" :allowClear="true" @search="handleSearchopen9"
                                v-model="objectOP.clothTypeClassify" :filter-option="false" allow-search
                                @focus="focusSelopen9">
                                <a-option v-for="item in pageData.nameOpen9" :value="item['FabricsClassify']">{{
                                    item['FabricsClassify']
                                }}</a-option>
                            </a-select>
                        </a-form-item>
                        <a-form-item label="布种类别" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-select popup-container="html"  class="bacClass" :loading="loading" :allowClear="true" @search="handleSearchopen5"
                                v-model="objectOP.clothKindType" :filter-option="false" allow-search @focus="focusSelopen5">
                                <a-option v-for="item in pageData.nameOpen5" :value="item['FabricsCategory']">{{
                                    item['FabricsCategory']
                                }}</a-option>
                            </a-select>
                        </a-form-item>
                        <a-form-item label="成分分类" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-select popup-container="html"  class="bacClass" :loading="loading" :allowClear="true" @search="handleSearchopen6"
                                v-model="objectOP.partType" :filter-option="false" allow-search @focus="focusSelopen6">
                                <a-option v-for="item in pageData.nameOpen6" :value="item['partTypeName']">{{
                                    item['partTypeName']
                                }}</a-option>
                            </a-select>
                        </a-form-item>
                        <a-form-item label="面料类别" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-select popup-container="html"  class="bacClass" :loading="loading" :allowClear="true" @search="handleSearchopen1"
                                v-model="objectOP.fabricType" :filter-option="false" allow-search @focus="focusSelopen1">
                                <a-option v-for="item in pageData.nameOpen1" :value="item['fabricCategory']">{{
                                    item['fabricCategory']
                                }}</a-option>
                            </a-select>
                        </a-form-item>
                        <a-form-item label="布号" :style="{ width: '345px' }" label-col-flex="100px"
                            :validate-trigger="['change', 'blur']" :rules="[{ required: true, message: '布号必填' }]"
                            field="clothCode">
                            <a-input class="bacClass" v-model="objectOP.clothCode"></a-input>
                        </a-form-item>
                        <a-form-item label="品名" :style="{ width: '345px' }" label-col-flex="100px"
                            :validate-trigger="['change', 'blur']" :rules="[{ required: true, message: '布号必填' }]"
                            field="brandName">
                            <a-input class="bacClass" v-model="objectOP.brandName"></a-input>
                        </a-form-item>
                        <a-form-item label="客户布号" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" v-model="objectOP.customClothCode"></a-input>
                        </a-form-item>
                        <a-form-item :style="{ width: '345px' }" label-col-flex="100px" label="单位">
                            <a-select popup-container="html"  class="bacClass" :loading="loading" :allowClear="true" @search="handleSearchDW"
                                v-model="objectOP.unit" :filter-option="false" allow-search @focus="focusSelDW">
                                <a-option v-for="item in pageData.nameOpenDW" :value="item['detailName']">{{
                                    item['detailName']
                                }}</a-option>
                            </a-select>
                        </a-form-item>
                        <a-form-item :style="{ width: '345px' }" label-col-flex="100px" label="有效门幅"
                            :validate-trigger="['change', 'blur']" :rules="[{ required: true, message: '有效门幅必填' }]"
                            field="validWidth">
                            <a-input class="bacClass" v-model="objectOP.validWidth"></a-input>
                        </a-form-item>
                        <a-form-item label="寸" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" v-model="objectOP.inch"></a-input>
                        </a-form-item>
                        <a-form-item label="门幅上限" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" v-model="objectOP.widthUpperLimit"></a-input>
                        </a-form-item>
                        <a-form-item label="门幅下限" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" v-model="objectOP.widthLowerLimit"></a-input>
                        </a-form-item>
                        <a-form-item label="门幅全幅" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" v-model="objectOP.widthAll"></a-input>
                        </a-form-item>
                        <a-form-item label="成品克重" :style="{ width: '345px' }" label-col-flex="100px"
                            :validate-trigger="['change', 'blur']" :rules="[{ required: true, message: '成品克重必填' }]"
                            field="fabricWeight">
                            <a-input class="bacClass" v-model="objectOP.fabricWeight"></a-input>
                        </a-form-item>
                        <a-form-item label="克重上限" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" v-model="objectOP.weightUpperLimit" />
                        </a-form-item>
                        <a-form-item label="克重下限" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" v-model="objectOP.weightLowerLimit"></a-input>
                        </a-form-item>
                        <a-form-item label="面料成份" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" v-model="objectOP.fabricPart"></a-input>
                        </a-form-item>
                        <a-form-item label="坯布编号" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-select popup-container="html"  class="bacClass" :loading="loading" :allowClear="true" @search="handleSearchopen4"
                                v-model="objectOP.grayCode" :filter-option="false" allow-search @focus="focusSelopen4"
                                @change="changeopen4">
                                <a-option v-for="item in pageData.nameOpen4" :value="item['greyCode']">{{
                                    item['greyCode'] + ' —— ' + item['grayFabricName'] }}</a-option>
                            </a-select>
                        </a-form-item>
                        <a-form-item label="坯布名称" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" v-model="objectOP.grayName" disabled></a-input>
                        </a-form-item>
                        <a-form-item label="成份说明" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" v-model="objectOP.partExplain"></a-input>
                        </a-form-item>
                        <a-form-item label="纱支" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" v-model="objectOP.yarn" disabled></a-input>
                        </a-form-item>
                        <a-form-item label="尺寸" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" v-model="objectOP.machineSize" disabled></a-input>
                        </a-form-item>
                        <a-form-item label="季节" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-select popup-container="html"  class="bacClass" :loading="loading" :allowClear="true" @search="handleSearch"
                                v-model="objectOP.season" :filter-option="false" allow-search @focus="focusSel">
                                <a-option v-for="item in pageData.clothList" :value="item['seasonName']">{{
                                    item['seasonName']
                                }}</a-option>
                            </a-select>
                        </a-form-item>
                        <!-- <a-form-item :style="{ width: '345px' }" label-col-flex="100px" label="缸型"
                            :validate-trigger="['change', 'blur']" :rules="[{ required: true, message: '缸型必填' }]"
                            field="cylinderType">
                            <a-select popup-container="html"  class="bacClass" :loading="loading" :allowClear="true" v-model="objectOP.cylinderType"
                                :filter-option="false" allow-search>
                                <a-option :value="1">E缸</a-option>
                                <a-option :value="2">S缸</a-option>
                            </a-select>
                        </a-form-item> -->
                        <a-form-item label="设备类型" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input disabled v-model="objectOP.deviceTypeName"></a-input>
                        </a-form-item>
                        <!-- <a-form-item :style="{ width: '345px' }" label-col-flex="100px" label="颜色深浅"
                            :validate-trigger="['change', 'blur']" :rules="[{ required: true, message: '颜色深浅必填' }]"
                            field="colorDepth">
                            <a-select popup-container="html"  class="bacClass" :loading="loading" :allowClear="true" @search="handleSearchLC_1"
                                v-model="objectOP.colorDepth" :filter-option="false" allow-search @focus="focusSelLC_1">
                                <a-option v-for="item in dataForm.clothList5_1" :value="item['shade']">{{
                                    item['shade']
                                }}</a-option>
                            </a-select>
                        </a-form-item> -->
                        <a-form-item label="收费项目" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-select popup-container="html"  class="bacClass" multiple :loading="loading" :allowClear="true"
                                @search="handleSearchopen7" v-model="objectOP.payItem" :filter-option="false" allow-search
                                @focus="focusSelopen7">
                                <a-option v-for="item in pageData.nameOpen7" :value="item['charges']">{{
                                    item['charges']
                                }}</a-option>
                            </a-select>
                        </a-form-item>
                        <a-form-item label="来样日期" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-date-picker  popup-container="html"  :style="{ width: '229px' }" class="bacClass" v-model="objectOP.comeSampleDate" />
                        </a-form-item>
                        <a-form-item label="密度 C" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" v-model="objectOP.densityC"></a-input>
                        </a-form-item>
                        <a-form-item label="密度 W" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" v-model="objectOP.densityW"></a-input>
                        </a-form-item>
                        <a-form-item label="出款日期" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-date-picker  popup-container="html"  :style="{ width: '229px' }" class="bacClass" v-model="objectOP.expendDate" />
                        </a-form-item>
                        <a-form-item label="备注" :style="{ width: '1200px' }" label-col-flex="100px">
                            <a-textarea class="bacClass" v-model="objectOP.remark" :max-length="400" allow-clear
                                show-word-limit style="width: 1200px;" />
                        </a-form-item>
                        <a-form-item :style="{ width: '345px' }" label-col-flex="100px">
                            <el-checkbox v-model="objectOP.containSpecialState" :true-label="1"
                                :false-label="0">含绢丝，羊毛，真丝，桑蚕丝，大豆，玉米</el-checkbox>
                        </a-form-item>
                    </a-form>
                    <div class="chinaNO1" v-if="isIDss == 5">{{ objectSCLC.produceFlowName }}</div>
                </div>
                <div class="my-divisders">
                    <a-divider orientation="center">
                        <icon-double-up v-if="headerShow" @click="headerShow = false" :strokeWidth="2" :size="18" />
                        <icon-double-down v-else @click="headerShow = true" :strokeWidth="2" :size="18" />
                    </a-divider>
                </div>

                <div style="height: 100%;">
                    <a-tabs   :lazy-load="true" :justify="true" @change="changeTabs1">
                        <a-tab-pane title="附件" :key="1">

                            <!-- <a-space direction="vertical" :style="{ width: '100%' }">
                                <a-upload action="/" :customRequest="customUpload1" />
                            </a-space> -->
                            <el-upload ref="uploadRef" class="upload-demo" :action="baseURLs + '/minio/file/upload'"
                                :auto-upload="false" :with-credentials="true" :headers="headers"
                                :on-success="uploadImgSuccess" v-model:file-list="fileList" :on-remove="handleRemove">
                                <template #trigger>
                                    <el-button type="primary">点击上传</el-button>
                                </template>
                                <!-- <el-button class="ml-3" type="success" @click="submitUpload">
                                    保存
                                </el-button> -->
                            </el-upload>

                        </a-tab-pane>
                        <a-tab-pane title="颜色" :key="2">
                            <a-table stripe :bordered="{ wrapper: true, cell: true }" :columns="tableColumns2"
                                :loading="table.tableLoading" :data="pageData.cfList2" :rowKey="rowKey" size="mini">
                                <template #del="{ record }">
                                    <icon-delete v-if="(record.customColorCode != '')"
                                        style="font-size: 30px;cursor: pointer;color: red;" @click="delRow2(record)" />
                                </template>
                                <template #customColorCode="{ record }">
                                    <div style="width:100%">
                                        <a-input class="bacClass" v-model="record.customColorCode"
                                            @change="changeCf2(record)" />
                                    </div>
                                </template>
                                <template #customColorName="{ record }">
                                    <div style="width:100%;"><a-input class="bacClass" v-model="record.customColorName" />
                                    </div>
                                </template>
                                <template #contrastWhiteState="{ record }">
                                    <div style="width:100%">
                                        <el-checkbox v-model="record.contrastWhiteState" :true-label="1" :false-label="0" />
                                    </div>
                                </template>
                                <template #addPayItem="{ record }">
                                    <div style="width:100%">
                                        <a-select popup-container="html"  class="bacClass" :loading="loading" @search="handleSearch2_2"
                                            v-model="record.addPayItem" :filter-option="false" allow-search allow-clear
                                            @focus="focusSel2_2">
                                            <a-option v-for="item in dataForm.nameList2" :value="item">{{
                                                item
                                            }}</a-option>
                                        </a-select>
                                    </div>
                                </template>
                                <template #minusPayItem="{ record }">
                                    <div style="width:100%">
                                        <a-select popup-container="html"  class="bacClass" :loading="loading" @search="handleSearch2_2"
                                            v-model="record.minusPayItem" :filter-option="false" allow-search allow-clear
                                            @focus="focusSel2_2">
                                            <a-option v-for="item in dataForm.nameList2" :value="item">{{
                                                item
                                            }}</a-option>
                                        </a-select>
                                    </div>
                                </template>
                                <template #deyplantColorCode="{ record }">
                                    <div style="width:100%">
                                        <a-select popup-container="html"  class="bacClass" :loading="loading" @search="handleSearchSH"
                                            v-model="record.deyplantColorCode" :filter-option="false" allow-search
                                            allow-clear @focus="focusSelSH">
                                            <a-option v-for="item in pageData.nameOpenSH" :value="item['colourNumber']">{{
                                                item['colourNumber']
                                            }}</a-option>
                                        </a-select>
                                    </div>
                                </template>
                                <template #remark="{ record }">
                                    <div style="width:100%">
                                        <a-input class="bacClass" v-model="record.remark" />
                                    </div>
                                </template>

                            </a-table>
                        </a-tab-pane>
                        <a-tab-pane title="整理参数" :key="3">
                            <div style="width: 50%; height: 100%; float: left;">
                                <a-table stripe :bordered="{ wrapper: true, cell: true }" :columns="tableColumns3"
                                    :loading="table.tableLoading" :data="pageData.cfList3" :rowKey="rowKey" size="mini">
                                    <template #del3="{ record }">
                                        <icon-delete v-if="(record.itemName != '')"
                                            style="font-size: 30px;cursor: pointer;color: red;" @click="delRow3(record)" />
                                    </template>
                                    <template #itemName="{ record }">
                                        <div style="width:100%">
                                            <a-select popup-container="html"  class="bacClass" :loading="loading" @search="handleSearch3"
                                                v-model="record.itemName" :filter-option="false" allow-search allow-clear
                                                @focus="focusSel3" @change="changeCf3(record)">
                                                <a-option v-for="item in pageData.nameList3"
                                                    :value="item['classifyDescribe']">{{
                                                        item['classifyDescribe'] }}</a-option>
                                            </a-select>
                                        </div>
                                    </template>
                                    <template #act3="{ record }">
                                        <div style="width:100%">
                                            <a-button type="primary" size="mini" status="success"
                                                @click="xiangqing(record)">详情</a-button>
                                        </div>
                                    </template>
                                </a-table>
                            </div>
                            <div style="width: 50%; height: 100%; float: left;">
                                <a-table stripe :bordered="{ wrapper: true, cell: true }" :columns="tableColumns3_1"
                                    :loading="table.tableLoading" :data="pageData.cfList3_1" :rowKey="rowKey" size="mini">
                                    <template #paramName="{ record }">
                                        <div style="width:100%">
                                            <a-input disabled v-model="record.paramName" />
                                        </div>
                                    </template>
                                    <template #paramValue="{ record }">
                                        <div style="width:100%">
                                            <a-input class="bacClass" v-model="record.paramValue" @input="inputs(record)" />
                                        </div>
                                    </template>
                                </a-table>
                            </div>
                        </a-tab-pane>
                        <a-tab-pane title="整理助剂" :key="4">
                            <div style="width: 50%; height: 100%; float: left;">
                                <a-table stripe :bordered="{ wrapper: true, cell: true }" :columns="tableColumns4"
                                    :loading="table.tableLoading" :data="pageData.cfList4" :rowKey="rowKey" size="mini">
                                    <template #del4="{ record }">
                                        <icon-delete v-if="(record.processName != '')"
                                            style="font-size: 30px;cursor: pointer;color: red;" @click="delRow4(record)" />
                                    </template>
                                    <template #processName="record">
                                        <div style="width:100%">
                                            <a-select popup-container="html"  class="bacClass" :loading="loading" @search="handleSearch4"
                                                v-model="record.record.processName" :filter-option="false" allow-search
                                                allow-clear @focus="focusSel4" @change="changeCf4(record)">
                                                <a-option v-for="item in dataForm.nameList4" :value="item['processName']">{{
                                                    item['processName'] + "————" + item['sectionName']
                                                }}</a-option>
                                            </a-select>
                                        </div>
                                    </template>
                                    <template #waterRatio="{ record }">
                                        <div style="width:100%">
                                            <a-input class="bacClass" v-model="record.waterRatio" @input="inputs(record)" />
                                        </div>
                                    </template>
                                    <template #act4="record">
                                        <div style="width:100%">
                                            <a-button type="primary" size="mini" status="success"
                                                @click="xiangqing4(record)">详情</a-button>
                                        </div>
                                    </template>
                                </a-table>
                            </div>
                            <div style="width: 50%; height: 100%; float: left;">
                                <a-table stripe :bordered="{ wrapper: true, cell: true }" :columns="tableColumns4_1"
                                    :loading="table.tableLoading" :data="pageData.cfList4[indedata].sonInfo"
                                    :rowKey="rowKey" size="mini">
                                    <!-- <a-table stripe :bordered="{ wrapper: true, cell: true }" :columns="tableColumns4_1"
                                    :loading="table.tableLoading" :data="pageData.cfList4_1"
                                    :rowKey="rowKey" size="mini"> -->
                                    <template #del4_1="{ record }">
                                        <icon-delete v-if="(record.adjuvantCode != '')"
                                            style="font-size: 30px;cursor: pointer;color: red;"
                                            @click="delRow4_1(record)" />
                                    </template>
                                    <template #adjuvantCode="{ record }">
                                        <div style="width:100%">
                                            <a-select popup-container="html"  class="bacClass" :loading="loading" @search="handleSearch4_1"
                                                v-model="record.adjuvantCode" :filter-option="false" allow-search
                                                allow-clear @focus="focusSel4_1" @change="changeCf4_1(record)">
                                                <a-option v-for="item in pageData.nameList4_1"
                                                    :value="item['materialCode']">{{
                                                        item['materialCode'] + "————" + item['materialName']
                                                    }}</a-option>
                                            </a-select>
                                        </div>
                                    </template>
                                    <template #adjuvantName="{ record }">
                                        <div style="width:100%">
                                            <a-input disabled v-model="record.adjuvantName" />
                                        </div>
                                    </template>
                                    <template #concentration="{ record }">
                                        <div style="width:100%">
                                            <a-input class="bacClass" v-model="record.concentration" />
                                        </div>
                                    </template>
                                    <template #unit="{ record }">
                                        <div style="width:100%">
                                            <a-input disabled v-model="record.unit" />
                                        </div>
                                    </template>
                                </a-table>
                            </div>
                        </a-tab-pane>
                        <a-tab-pane title="工艺路线" :key="5">
                            <!-- <a-form size="small" :model="objectSCLC" layout="inline" ref="formRef"> -->
                            <!-- <a-form size="small" :model="objectSCLC" layout="inline">
                                <div class="aaaaaa">
                                    <a-form-item label="生产流程" :validate-trigger="['change', 'blur']"
                                        :rules="[{ required: true, message: '生产流程必填' }]" field="produceFlowName">
                                        <a-select popup-container="html"  popup-container=".kkk" class="bacClass" ref="abcRef" :loading="loading"
                                            :allowClear="true" @search="handleSearchLC" v-model="objectSCLC.produceFlowName"
                                            :filter-option="false" allow-search @focus="focusSelLC" @change="changeLC"
                                            :style="{ width: '200px' }">
                                            <a-option v-for="item in dataForm.clothList5" :value="item['flows']">{{
                                                item['flows']
                                            }}</a-option>
                                        </a-select>
                                    </a-form-item>
                                </div>
                                <a-form-item label="标准每管落缸匹数" v-if="isIDss == 5">
                                    <a-input :style="{ width: '200px' }" class="bacClass"
                                        v-model="objectSCLC.normPower"></a-input>
                                </a-form-item>
                                <a-form-item label="染色类别" v-if="isIDss == 5">
                                    <a-select popup-container="html"  :style="{ width: '200px' }" class="bacClass" :loading="loading"
                                        :allowClear="true" @search="handleSearchLC_3" v-model="objectSCLC.dyeTypeName"
                                        :filter-option="false" allow-search @focus="focusSelLC_3">
                                        <a-option v-for="item in dataForm.clothList5_3" :value="item['jobType']">{{
                                            item['jobType']
                                        }}</a-option>
                                    </a-select>
                                </a-form-item>
                                <a-form-item label="工艺单号" v-if="isIDss == 5">
                                    <a-input :style="{ width: '200px' }" disabled
                                        v-model="objectSCLC.produceFlowCode"></a-input>
                                </a-form-item>
                            </a-form> -->
                            <div style="width: 100%; float: left;margin-bottom: 5px;"><el-button @click="clickSC"
                                    style="background-color: blue; color: #fff;">选取生产流程</el-button></div>
                            <div style="width: 50%; height: 100%; float: left;">
                                <a-table stripe :bordered="{ wrapper: true, cell: true }" :columns="tableColumns5"
                                    :loading="table.tableLoading" :data="pageData.cfList5" :rowKey="rowKey" size="mini"
                                    :scrollbar="true"
                                    :row-selection="{ showCheckedAll: true, width: 50, onlyCurrent: true }" sticky-header
                                    :pagination="false" style="margin-bottom: 20px;">
                                    <template #del5="{ record }">
                                        <icon-delete style="font-size: 30px;cursor: pointer;color: red;"
                                            @click="delRow5(record)" />
                                    </template>
                                    <template #colorDepth="{ record }">
                                        <div style="width:100%">
                                            <a-select popup-container="html"  class="bacClass" :loading="loading" :allowClear="true"
                                                @search="handleSearchLC_1" v-model="record.colorDepth"
                                                :filter-option="false" allow-search @focus="focusSelLC_1">
                                                <a-option v-for="item in dataForm.clothList5_1" :value="item['shade']">{{
                                                    item['shade']
                                                }}</a-option>
                                            </a-select>
                                        </div>
                                    </template>
                                    <template #cylinderType="{ record }">
                                        <div style="width:100%">
                                            <a-select popup-container="html"  class="bacClass" :loading="loading" v-model="record.cylinderType"
                                                :filter-option="false" allow-search allow-clear>
                                                <a-option :value="1">E缸</a-option>
                                                <a-option :value="2">S缸</a-option>
                                            </a-select>
                                        </div>
                                    </template>
                                    <template #normPower="{ record }">
                                        <div style="width:100%">
                                            <a-input-number class="bacClass" v-model="record.normPower" />
                                        </div>
                                    </template>
                                    <template #dyeTypeName="{ record }">
                                        <div style="width:100%">
                                            <a-select popup-container="html"  class="bacClass" :loading="loading" :allowClear="true"
                                                @search="handleSearchLC_3" v-model="record.dyeTypeName"
                                                :filter-option="false" allow-search @focus="focusSelLC_3">
                                                <a-option v-for="item in dataForm.clothList5_3" :value="item['jobType']">{{
                                                    item['jobType']
                                                }}</a-option>
                                            </a-select>
                                        </div>
                                    </template>
                                    <template #produceFlowCode="{ record }">
                                        <div style="width:100%">
                                            <a-input class="bacClass" disabled v-model="record.produceFlowCode" />
                                        </div>
                                    </template>
                                    <template #produceFlowName="{ record }">
                                        <div style="width:100%">
                                            <a-input class="bacClass" disabled v-model="record.produceFlowName" />
                                        </div>
                                    </template>
                                    <template #act5="{ record }">
                                        <div style="width:100%">
                                            <a-button type="primary" size="mini" status="success"
                                                @click="xiangqing5(record)">详情</a-button>
                                        </div>
                                    </template>
                                </a-table>
                            </div>
                            <div style="width: 50%; height: 100%; float: left;">
                                <a-table stripe :bordered="{ wrapper: true, cell: true }" :columns="tableColumns5_1"
                                    :loading="table.tableLoading" :data="pageData.cfList5_1" :rowKey="rowKey" size="mini"
                                    :scrollbar="true"
                                    :row-selection="{ showCheckedAll: true, width: 50, onlyCurrent: true }" sticky-header
                                    :pagination="false">
                                    <!-- <template #processName="{ record }">
                                    <div style="width:100%">
                                        <a-input disabled v-model="record.processName" />
                                    </div>
                                </template>
                                <template #processExplain="{ record }">
                                    <div style="width:100%;"><a-input disabled v-model="record.processExplain" />
                                    </div>
                                </template> -->
                                    <template #paramValue1="{ record }">
                                        <div style="width:100%">
                                            <a-input class="bacClass" v-model="record.paramValue1"
                                                @input="inputs5_2(record)" />
                                        </div>
                                    </template>
                                    <template #paramValue2="{ record }">
                                        <div style="width:100%">
                                            <a-input class="bacClass" v-model="record.paramValue2"
                                                @input="inputs5_2(record)" />
                                        </div>
                                    </template>
                                    <template #paramValue3="{ record }">
                                        <div style="width:100%">
                                            <a-input class="bacClass" v-model="record.paramValue3"
                                                @input="inputs5_2(record)" />
                                        </div>
                                    </template>
                                    <template #paramValue4="{ record }">
                                        <div style="width:100%">
                                            <a-input class="bacClass" v-model="record.paramValue4"
                                                @input="inputs5_2(record)" />
                                        </div>
                                    </template>
                                    <template #paramValue5="{ record }">
                                        <div style="width:100%">
                                            <a-input class="bacClass" v-model="record.paramValue5"
                                                @input="inputs5_2(record)" />
                                        </div>
                                    </template>
                                    <template #paramValue6="{ record }">
                                        <div style="width:100%">
                                            <a-input class="bacClass" v-model="record.paramValue6"
                                                @input="inputs5_2(record)" />
                                        </div>
                                    </template>
                                    <template #paramValue7="{ record }">
                                        <div style="width:100%">
                                            <a-input class="bacClass" v-model="record.paramValue7"
                                                @input="inputs5_2(record)" />
                                        </div>
                                    </template>
                                    <template #paramValue8="{ record }">
                                        <div style="width:100%">
                                            <a-input class="bacClass" v-model="record.paramValue8"
                                                @input="inputs5_2(record)" />
                                        </div>
                                    </template>
                                    <template #paramValue9="{ record }">
                                        <div style="width:100%">
                                            <a-input class="bacClass" v-model="record.paramValue9"
                                                @input="inputs5_2(record)" />
                                        </div>
                                    </template>
                                    <template #paramValue10="{ record }">
                                        <div style="width:100%">
                                            <a-input class="bacClass" v-model="record.paramValue10"
                                                @input="inputs5_2(record)" />
                                        </div>
                                    </template>
                                    <template #remark="{ record }">
                                        <div style="width:100%">
                                            <a-input @input="inputs5_2(record)" class="bacClass" v-model="record.remark" />
                                        </div>
                                    </template>
                                </a-table>
                            </div>
                        </a-tab-pane>
                        <a-tab-pane title="客户要求" :key="7">
                            <a-row :gutter="16">
                                <a-col :span="4">
                                    <a-form-item label="测试标准">
                                        <a-select popup-container="html"  class="bacClass" :loading="loading" :allowClear="true"
                                            @search="handleSearchKH_1" v-model="objectKH.testStandard"
                                            :filter-option="false" allow-search @focus="focusSelKH_1">
                                            <a-option v-for="item in pageData.nameList7_1"
                                                :value="item['verifyStandard']">{{
                                                    item['verifyStandard']
                                                }}</a-option>
                                        </a-select>
                                    </a-form-item>
                                </a-col>
                                <a-col :span="4">
                                    <a-form-item label="胶管名称">
                                        <a-select popup-container="html"  class="bacClass" :loading="loading" :allowClear="true"
                                            @search="handleSearchKH_2" v-model="objectKH.rubberSac" :filter-option="false"
                                            allow-search @focus="focusSelKH_2">
                                            <a-option v-for="item in pageData.nameList7_2"
                                                :value="item['rubberhoseName']">{{
                                                    item['rubberhoseName']
                                                }}</a-option>
                                        </a-select>
                                    </a-form-item>
                                </a-col>
                                <a-col :span="4">
                                    <a-form-item label="胶带重量">
                                        <a-input-number class="bacClass" v-model="objectKH.tapesWeight" />
                                    </a-form-item>
                                </a-col>
                            </a-row>
                            <a-table stripe :bordered="{ wrapper: true, cell: true }" :columns="tableColumns7"
                                :loading="table.tableLoading" :data="pageData.cfList7" :rowKey="rowKey" size="mini">
                                <template #del7="{ record }" class="onlyNo1">
                                    <icon-delete v-if="(record.itemName != '')"
                                        style="font-size: 30px;cursor: pointer;color: red;" @click="delRow7(record)" />
                                </template>
                                <template #itemName="{ record }">
                                    <div style="width:100%;"><a-select popup-container="html"  :loading="loading" @search="handleSearch7"
                                            v-model="record.itemName" :filter-option="false" allow-search allow-clear
                                            @focus="focusSel7" @change="changeCf7(record)" class="bacClass">
                                            <a-option v-for="item in pageData.nameList7" :value="item['classify']">{{
                                                item['classify']
                                            }}</a-option>
                                        </a-select>
                                    </div>
                                </template>
                                <template #paramValue="{ record }">
                                    <div style="width:100%">
                                        <a-input disabled v-model="record.paramValue" />
                                    </div>

                                </template>
                                <template #unit="{ record }">
                                    <div style="width:100%">
                                        <a-input disabled v-model="record.unit" />
                                    </div>
                                </template>
                                <template #requireClass="{ record }">
                                    <div style="width:100%">
                                        <a-input disabled v-model="record.requireClass" />
                                    </div>
                                </template>
                            </a-table>
                        </a-tab-pane>
                        <a-tab-pane title="其他信息" :key="8">
                            <a-row :gutter="24">
                                <a-col :span="8">
                                    <a-form-item label="毛坯门幅">
                                        <a-input class="bacClass" v-model="objectQT.blankWidth"></a-input>
                                    </a-form-item>
                                </a-col>
                                <a-col :span="8">
                                    <a-form-item label="毛坯克重">
                                        <a-input-number class="bacClass" v-model="objectQT.blankWeight"></a-input-number>
                                    </a-form-item>
                                </a-col>
                                <a-col :span="8">
                                    <a-form-item label="码重">
                                        <a-input-number class="bacClass" v-model="objectQT.yardWeight"></a-input-number>
                                    </a-form-item>
                                </a-col>
                            </a-row>
                            <a-row :gutter="24">
                                <a-col :span="8">
                                    <a-form-item label="供应商">
                                        <a-select popup-container="html"  class="bacClass" :loading="loading" :allowClear="true"
                                            @search="handleSearchGYS" v-model="objectQT.supplierName" :filter-option="false"
                                            allow-search @focus="focusSelGYS">
                                            <a-option v-for="item in pageData.nameOpenGYS" :value="item['providerName']">{{
                                                item['providerName']
                                            }}</a-option>
                                        </a-select>
                                    </a-form-item>
                                </a-col>
                                <a-col :span="8">
                                    <a-form-item label="工厂布号">
                                        <a-input class="bacClass" v-model="objectQT.factoryClothCode"></a-input>
                                    </a-form-item>
                                </a-col>
                                <a-col :span="8">
                                    <a-form-item label="总部登记号">
                                        <a-input class="bacClass" v-model="objectQT.headRegisterCode"></a-input>
                                    </a-form-item>
                                </a-col>
                            </a-row>
                            <a-row :gutter="24">
                                <a-col :span="8">
                                    <a-form-item label="总部布号">
                                        <a-input class="bacClass" v-model="objectQT.headClothCode"></a-input>
                                    </a-form-item>
                                </a-col>
                                <a-col :span="8">
                                    <a-form-item label="产出率预警">
                                        <a-input-number class="bacClass" v-model="objectQT.outputRateWarn"></a-input-number>
                                    </a-form-item>
                                </a-col>
                                <a-col :span="8">
                                    <a-form-item label="产出率目标">
                                        <a-input-number class="bacClass"
                                            v-model="objectQT.outputRateTarget"></a-input-number>
                                    </a-form-item>
                                </a-col>
                            </a-row>
                        </a-tab-pane>

                    </a-tabs>
                </div>

            </div>
        </a-drawer>
        <!-- 详情抽屉 -->
        <a-drawer :drawer-style="{ 'zIndex': 9999 }" :mask-closable="false" height="100%" :visible="pageData.showAdd9"
            unmountOnClose @cancel="pageData.showAdd9 = false" cancel-text='关闭' placement="bottom">
            <template #title>
                {{ pageData.sideTitle }}
            </template>
            <div style="min-width:1500px;">
                <div>
                    <a-form ref="formRef" size="small" :model="pageData" layout="inline" label-align="right"
                        :label-col-props="{ span: 8 }" :wrapper-col-props="{ span: 16 }">
                        <a-form-item label="登记号" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" v-model="objectOP.registerCode" disabled></a-input>
                        </a-form-item>
                        <a-form-item label="客户名称" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-select popup-container="html"  class="bacClass" disabled :loading="loading" :allowClear="true"
                                @search="handleSearchKHMC" v-model="objectOP.customName" :filter-option="false" allow-search
                                @focus="focusSelKHMC">
                                <a-option v-for="item in pageData.nameOpenKHMC" :value="item['customName']">{{
                                    item['customName']
                                }}</a-option>
                            </a-select>
                        </a-form-item>
                        <a-form-item label="登记日期" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-date-picker  popup-container="html"  :style="{ width: '229px' }" class="bacClass" disabled
                                v-model="objectOP.registerDate" />
                        </a-form-item>
                        <a-form-item label="面料状态" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-select popup-container="html"  class="bacClass" disabled :loading="loading" :allowClear="true"
                                v-model="objectOP.fabricState" :filter-option="false" allow-search>
                                <a-option :value="1">开发面料</a-option>
                                <a-option :value="2">成品面料</a-option>
                            </a-select>
                        </a-form-item>
                        <a-form-item label="布类" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-select popup-container="html"  class="bacClass" disabled :loading="loading" :allowClear="true"
                                @search="handleSearchopen2" v-model="objectOP.clothType" :filter-option="false" allow-search
                                @focus="focusSelopen2">
                                <a-option v-for="item in pageData.nameOpen2" :value="item['mercery']">{{
                                    item['mercery']
                                }}</a-option>
                            </a-select>
                        </a-form-item>
                        <a-form-item label="布种分类" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-select popup-container="html"  class="bacClass" disabled :loading="loading" :allowClear="true"
                                @search="handleSearchopen9" v-model="objectOP.clothTypeClassify" :filter-option="false"
                                allow-search @focus="focusSelopen9">
                                <a-option v-for="item in pageData.nameOpen9" :value="item['FabricsClassify']">{{
                                    item['FabricsClassify']
                                }}</a-option>
                            </a-select>
                        </a-form-item>
                        <a-form-item label="布种类别" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-select popup-container="html"  class="bacClass" disabled :loading="loading" :allowClear="true"
                                @search="handleSearchopen5" v-model="objectOP.clothKindType" :filter-option="false"
                                allow-search @focus="focusSelopen5">
                                <a-option v-for="item in pageData.nameOpen5" :value="item['FabricsCategory']">{{
                                    item['FabricsCategory']
                                }}</a-option>
                            </a-select>
                        </a-form-item>
                        <a-form-item label="成分分类" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-select popup-container="html"  class="bacClass" disabled :loading="loading" :allowClear="true"
                                @search="handleSearchopen6" v-model="objectOP.partType" :filter-option="false" allow-search
                                @focus="focusSelopen6">
                                <a-option v-for="item in pageData.nameOpen6" :value="item['partTypeName']">{{
                                    item['partTypeName']
                                }}</a-option>
                            </a-select>
                        </a-form-item>
                        <a-form-item label="面料类别" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-select popup-container="html"  class="bacClass" disabled :loading="loading" :allowClear="true"
                                @search="handleSearchopen1" v-model="objectOP.fabricType" :filter-option="false"
                                allow-search @focus="focusSelopen1">
                                <a-option v-for="item in pageData.nameOpen1" :value="item['fabricCategory']">{{
                                    item['fabricCategory']
                                }}</a-option>
                            </a-select>
                        </a-form-item>
                        <a-form-item label="布号" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" disabled v-model="objectOP.clothCode"></a-input>
                        </a-form-item>
                        <a-form-item label="品名" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" disabled v-model="objectOP.brandName"></a-input>
                        </a-form-item>
                        <a-form-item label="客户布号" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" disabled v-model="objectOP.customClothCode"></a-input>
                        </a-form-item>
                        <a-form-item label="单位" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-select popup-container="html"  class="bacClass" disabled :loading="loading" :allowClear="true"
                                @search="handleSearchDW" v-model="objectOP.unit" :filter-option="false" allow-search
                                @focus="focusSelDW">
                                <a-option v-for="item in pageData.nameOpenDW" :value="item['detailName']">{{
                                    item['detailName']
                                }}</a-option>
                            </a-select>
                        </a-form-item>
                        <a-form-item label="有效门幅" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" disabled v-model="objectOP.validWidth"></a-input>
                        </a-form-item>
                        <a-form-item label="寸" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" disabled v-model="objectOP.inch"></a-input>
                        </a-form-item>
                        <a-form-item label="门幅上限" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" disabled v-model="objectOP.widthUpperLimit"></a-input>
                        </a-form-item>
                        <a-form-item label="门幅下限" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" disabled v-model="objectOP.widthLowerLimit"></a-input>
                        </a-form-item>
                        <a-form-item label="门幅全幅" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" disabled v-model="objectOP.widthAll"></a-input>
                        </a-form-item>
                        <a-form-item label="成品克重" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" disabled v-model="objectOP.fabricWeight"></a-input>
                        </a-form-item>
                        <a-form-item label="克重上限" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" disabled v-model="objectOP.weightUpperLimit" />
                        </a-form-item>
                        <a-form-item label="克重下限" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" disabled v-model="objectOP.weightLowerLimit"></a-input>
                        </a-form-item>
                        <a-form-item label="面料成份" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" disabled v-model="objectOP.fabricPart"></a-input>
                        </a-form-item>
                        <a-form-item label="坯布编号" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-select popup-container="html"  class="bacClass" disabled :loading="loading" :allowClear="true"
                                @search="handleSearchopen4" v-model="objectOP.grayCode" :filter-option="false" allow-search
                                @focus="focusSelopen4" @change="changeopen4">
                                <a-option v-for="item in pageData.nameOpen4" :value="item['greyCode']">{{
                                    item['greyCode']
                                }}</a-option>
                            </a-select>
                        </a-form-item>
                        <a-form-item label="坯布名称" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" v-model="objectOP.grayName" disabled></a-input>
                        </a-form-item>
                        <a-form-item label="成份说明" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" disabled v-model="objectOP.partExplain"></a-input>
                        </a-form-item>
                        <a-form-item label="纱支" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" v-model="objectOP.yarn" disabled></a-input>
                        </a-form-item>
                        <a-form-item label="尺寸" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" v-model="objectOP.machineSize" disabled></a-input>
                        </a-form-item>
                        <a-form-item label="季节" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-select popup-container="html"  class="bacClass" disabled :loading="loading" :allowClear="true" @search="handleSearch"
                                v-model="objectOP.season" :filter-option="false" allow-search @focus="focusSel">
                                <a-option v-for="item in pageData.clothList" :value="item['seasonName']">{{
                                    item['seasonName']
                                }}</a-option>
                            </a-select>
                        </a-form-item>
                        <!-- <a-form-item label="缸型" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-select popup-container="html"  class="bacClass" disabled :loading="loading" :allowClear="true"
                                v-model="objectOP.cylinderType" :filter-option="false" allow-search>
                                <a-option :value="1">E缸</a-option>
                                <a-option :value="2">S缸</a-option>
                            </a-select>
                        </a-form-item> -->
                        <a-form-item label="设备类型" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input disabled v-model="objectOP.deviceTypeName"></a-input>
                        </a-form-item>
                        <!-- <a-form-item label="颜色深浅" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-select popup-container="html"  class="bacClass" disabled :loading="loading" :allowClear="true"
                                @search="handleSearchLC_1" v-model="objectOP.colorDepth" :filter-option="false" allow-search
                                @focus="focusSelLC_1">
                                <a-option v-for="item in dataForm.clothList5_1" :value="item['shade']">{{
                                    item['shade']
                                }}</a-option>
                            </a-select>
                        </a-form-item> -->
                        <a-form-item label="收费项目" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-select popup-container="html"  class="bacClass" disabled multiple :loading="loading" :allowClear="true"
                                @search="handleSearchopen7" v-model="objectOP.payItem" :filter-option="false" allow-search
                                @focus="focusSelopen7">
                                <a-option v-for="item in pageData.nameOpen7" :value="item['charges']">{{
                                    item['charges']
                                }}</a-option>
                            </a-select>
                        </a-form-item>
                        <a-form-item label="来样日期" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-date-picker  popup-container="html"  :style="{ width: '229px' }" class="bacClass" disabled
                                v-model="objectOP.comeSampleDate" />
                        </a-form-item>
                        <a-form-item label="密度 C" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" disabled v-model="objectOP.densityC"></a-input>
                        </a-form-item>
                        <a-form-item label="密度 W" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-input class="bacClass" disabled v-model="objectOP.densityW"></a-input>
                        </a-form-item>
                        <a-form-item label="出款日期" :style="{ width: '345px' }" label-col-flex="100px">
                            <a-date-picker  popup-container="html"  :style="{ width: '229px' }" class="bacClass" disabled
                                v-model="objectOP.expendDate" />
                        </a-form-item>
                        <a-form-item label="备注" :style="{ width: '1200px' }" label-col-flex="100px">
                            <a-textarea class="bacClass" disabled v-model="objectOP.remark" :max-length="400" allow-clear
                                style="width: 1200px;" show-word-limit />
                        </a-form-item>
                        <a-form-item :style="{ width: '345px' }" label-col-flex="100px">
                            <el-checkbox disabled v-model="objectOP.containSpecialState" :true-label="1"
                                :false-label="0">含绢丝，羊毛，真丝，桑蚕丝，大豆，玉米</el-checkbox>
                        </a-form-item>
                    </a-form>
                    <div class="chinaNO1" v-if="isIDss == 5">{{ objectSCLC.produceFlowName }}</div>
                </div>
                <div class="my-divisders">
                    <a-divider orientation="center">
                        <icon-double-up v-if="headerShow" @click="headerShow = false" :strokeWidth="2" :size="18" />
                        <icon-double-down v-else @click="headerShow = true" :strokeWidth="2" :size="18" />
                    </a-divider>
                </div>

                <div style="height: 100%;">
                    <a-tabs   :lazy-load="true" :justify="true" @change="changeTabs1">
                        <a-tab-pane title="附件" :key="1">

                            <a-space direction="vertical" :style="{ width: '100%' }">
                                <a-upload action="/" />
                            </a-space>

                        </a-tab-pane>
                        <a-tab-pane title="颜色" :key="2">
                            <a-table stripe :bordered="{ wrapper: true, cell: true }" :columns="tableColumns2"
                                :loading="table.tableLoading" :data="pageData.cfList2" :rowKey="rowKey" size="mini">
                                <template #customColorCode="{ record }">
                                    <div style="width:100%">
                                        <a-input class="bacClass" disabled v-model="record.customColorCode"
                                            @change="changeCf2(record)" />
                                    </div>
                                </template>
                                <template #customColorName="{ record }">
                                    <div style="width:100%;"><a-input disabled class="bacClass"
                                            v-model="record.customColorName" />
                                    </div>
                                </template>
                                <template #contrastWhiteState="{ record }">
                                    <div style="width:100%">
                                        <el-checkbox disabled v-model="record.contrastWhiteState" :true-label="1"
                                            :false-label="0" />
                                    </div>

                                </template>
                                <template #addPayItem="{ record }">
                                    <div style="width:100%">
                                        <a-select popup-container="html"  disabled :loading="loading" @search="handleSearch2_2"
                                            v-model="record.addPayItem" :filter-option="false" allow-search allow-clear
                                            @focus="focusSel2_2">
                                            <a-option v-for="item in dataForm.nameList2" :value="item">{{
                                                item
                                            }}</a-option>
                                        </a-select>
                                    </div>
                                </template>
                                <template #minusPayItem="{ record }">
                                    <div style="width:100%">
                                        <a-select popup-container="html"  disabled :loading="loading" @search="handleSearch2_2"
                                            v-model="record.minusPayItem" :filter-option="false" allow-search allow-clear
                                            @focus="focusSel2_2">
                                            <a-option v-for="item in dataForm.nameList2" :value="item">{{
                                                item
                                            }}</a-option>
                                        </a-select>
                                    </div>
                                </template>
                                <template #deyplantColorCode="{ record }">
                                    <div style="width:100%">
                                        <a-select popup-container="html"  disabled :loading="loading" @search="handleSearchSH"
                                            v-model="record.deyplantColorCode" :filter-option="false" allow-search
                                            allow-clear @focus="focusSelSH">
                                            <a-option v-for="item in pageData.nameOpenSH" :value="item['colourNumber']">{{
                                                item['colourNumber']
                                            }}</a-option>
                                        </a-select>
                                    </div>
                                </template>
                                <template #remark="{ record }">
                                    <div style="width:100%">
                                        <a-input disabled class="bacClass" v-model="record.remark" />
                                    </div>
                                </template>

                            </a-table>
                        </a-tab-pane>
                        <a-tab-pane title="整理参数" :key="3">
                            <div style="width: 50%; height: 100%; float: left;">
                                <a-table stripe :bordered="{ wrapper: true, cell: true }" :columns="tableColumns3"
                                    :loading="table.tableLoading" :data="pageData.cfList3" :rowKey="rowKey" size="mini">
                                    <template #itemName="{ record }">
                                        <div style="width:100%">
                                            <a-select popup-container="html"  disabled :loading="loading" @search="handleSearch3"
                                                v-model="record.itemName" :filter-option="false" allow-search allow-clear
                                                @focus="focusSel3" @change="changeCf3(record)">
                                                <a-option v-for="item in pageData.nameList3"
                                                    :value="item['classifyDescribe']">{{
                                                        item['classifyDescribe'] }}</a-option>
                                            </a-select>
                                        </div>
                                    </template>
                                    <template #act3="{ record }">
                                        <div style="width:100%">
                                            <a-button type="primary" size="mini" status="success"
                                                @click="xiangqing(record)">详情</a-button>
                                        </div>
                                    </template>
                                </a-table>
                            </div>
                            <div style="width: 50%; height: 100%; float: left;">
                                <a-table stripe :bordered="{ wrapper: true, cell: true }" :columns="tableColumns3_1"
                                    :loading="table.tableLoading" :data="pageData.cfList3_1" :rowKey="rowKey" size="mini">
                                    <template #paramName="{ record }">
                                        <div style="width:100%">
                                            <a-input class="bacClass" disabled v-model="record.paramName" />
                                        </div>
                                    </template>
                                    <template #paramValue="{ record }">
                                        <div style="width:100%">
                                            <a-input disabled class="bacClass" v-model="record.paramValue"
                                                @input="inputs(record)" />
                                        </div>
                                    </template>
                                </a-table>
                            </div>
                        </a-tab-pane>
                        <a-tab-pane title="整理助剂" :key="4">
                            <div style="width: 50%; height: 100%; float: left;">
                                <a-table stripe :bordered="{ wrapper: true, cell: true }" :columns="tableColumns4"
                                    :loading="table.tableLoading" :data="pageData.cfList4" :rowKey="rowKey" size="mini">
                                    <template #processName="record">
                                        <div style="width:100%">
                                            <a-select popup-container="html"  disabled :loading="loading" @search="handleSearch4"
                                                v-model="record.record.processName" :filter-option="false" allow-search
                                                allow-clear @focus="focusSel4" @change="changeCf4(record)">
                                                <a-option v-for="item in dataForm.nameList4" :value="item['processName']">{{
                                                    item['processName']
                                                }}</a-option>
                                            </a-select>
                                        </div>
                                    </template>
                                    <template #waterRatio="{ record }">
                                        <div style="width:100%">
                                            <a-input disabled class="bacClass" v-model="record.waterRatio"
                                                @input="inputs(record)" />
                                        </div>
                                    </template>
                                    <template #act4="record">
                                        <div style="width:100%">
                                            <a-button type="primary" size="mini" status="success"
                                                @click="xiangqing4(record)">详情</a-button>
                                        </div>
                                    </template>
                                </a-table>
                            </div>
                            <div style="width: 50%; height: 100%; float: left;">
                                <a-table stripe :bordered="{ wrapper: true, cell: true }" :columns="tableColumns4_1"
                                    :loading="table.tableLoading" :data="pageData.cfList4[indedata].sonInfo"
                                    :rowKey="rowKey" size="mini">
                                    <template #adjuvantCode="{ record }">
                                        <div style="width:100%">
                                            <a-select popup-container="html"  disabled class="bacClass" :loading="loading" @search="handleSearch4_1"
                                                v-model="record.adjuvantCode" :filter-option="false" allow-search
                                                allow-clear @focus="focusSel4_1" @change="changeCf4_1(record)">
                                                <a-option v-for="item in pageData.nameList4_1"
                                                    :value="item['materialCode']">{{
                                                        item['materialCode']
                                                    }}</a-option>
                                            </a-select>
                                        </div>
                                    </template>
                                    <template #adjuvantName="{ record }">
                                        <div style="width:100%">
                                            <a-input disabled v-model="record.adjuvantName" />
                                        </div>
                                    </template>
                                    <template #concentration="{ record }">
                                        <div style="width:100%">
                                            <a-input disabled class="bacClass" v-model="record.concentration" />
                                        </div>
                                    </template>
                                    <template #unit="{ record }">
                                        <div style="width:100%">
                                            <a-input disabled v-model="record.unit" />
                                        </div>
                                    </template>
                                </a-table>
                            </div>
                        </a-tab-pane>
                        <a-tab-pane title="工艺路线" :key="5">
                            <div style="width: 50%; height: 100%; float: left;">
                                <a-table stripe :bordered="{ wrapper: true, cell: true }" :columns="tableColumns5"
                                    :loading="table.tableLoading" :data="pageData.cfList5" :rowKey="rowKey" size="mini"
                                    :scrollbar="true"
                                    :row-selection="{ showCheckedAll: true, width: 50, onlyCurrent: true }" sticky-header
                                    :pagination="false" style="margin-bottom: 20px;">
                                    <template #del5="{ record }">
                                        <icon-delete style="font-size: 30px;cursor: pointer;color: red;" />
                                    </template>
                                    <template #colorDepth="{ record }">
                                        <div style="width:100%">
                                            <a-select popup-container="html"  class="bacClass" disabled :loading="loading" :allowClear="true"
                                                @search="handleSearchLC_1" v-model="record.colorDepth"
                                                :filter-option="false" allow-search @focus="focusSelLC_1">
                                                <a-option v-for="item in dataForm.clothList5_1" :value="item['shade']">{{
                                                    item['shade']
                                                }}</a-option>
                                            </a-select>
                                        </div>
                                    </template>
                                    <template #cylinderType="{ record }">
                                        <div style="width:100%">
                                            <a-select popup-container="html"  disabled class="bacClass" :loading="loading"
                                                v-model="record.cylinderType" :filter-option="false" allow-search
                                                allow-clear>
                                                <a-option :value="1">E缸</a-option>
                                                <a-option :value="2">S缸</a-option>
                                            </a-select>
                                        </div>
                                    </template>
                                    <template #normPower="{ record }">
                                        <div style="width:100%">
                                            <a-input-number disabled class="bacClass" v-model="record.normPower" />
                                        </div>
                                    </template>
                                    <template #dyeTypeName="{ record }">
                                        <div style="width:100%">
                                            <a-select popup-container="html"  disabled class="bacClass" :loading="loading" :allowClear="true"
                                                @search="handleSearchLC_3" v-model="record.dyeTypeName"
                                                :filter-option="false" allow-search @focus="focusSelLC_3">
                                                <a-option v-for="item in dataForm.clothList5_3" :value="item['jobType']">{{
                                                    item['jobType']
                                                }}</a-option>
                                            </a-select>
                                        </div>
                                    </template>
                                    <template #produceFlowCode="{ record }">
                                        <div style="width:100%">
                                            <a-input disabled class="bacClass" v-model="record.produceFlowCode" />
                                        </div>
                                    </template>
                                    <template #produceFlowName="{ record }">
                                        <div style="width:100%">
                                            <a-input disabled class="bacClass" v-model="record.produceFlowName" />
                                        </div>
                                    </template>
                                    <template #act5="{ record }">
                                        <div style="width:100%">
                                            <a-button type="primary" size="mini" status="success"
                                                @click="xiangqing5(record)">详情</a-button>
                                        </div>
                                    </template>
                                </a-table>
                            </div>
                            <div style="width: 50%; height: 100%; float: left;">
                                <a-table stripe :bordered="{ wrapper: true, cell: true }" :columns="tableColumns5_1"
                                    :loading="table.tableLoading" :data="pageData.cfList5_1" :rowKey="rowKey" size="mini"
                                    :scrollbar="true"
                                    :row-selection="{ showCheckedAll: true, width: 50, onlyCurrent: true }" sticky-header
                                    :pagination="false">
                                    <!-- <template #processName="{ record }">
                                    <div style="width:100%">
                                        <a-input disabled v-model="record.processName" />
                                    </div>
                                </template>
                                <template #processExplain="{ record }">
                                    <div style="width:100%;"><a-input disabled v-model="record.processExplain" />
                                    </div>
                                </template> -->
                                    <template #paramValue1="{ record }">
                                        <div style="width:100%">
                                            <a-input disabled class="bacClass" v-model="record.paramValue1"
                                                @input="inputs5_2(record)" />
                                        </div>
                                    </template>
                                    <template #paramValue2="{ record }">
                                        <div style="width:100%">
                                            <a-input disabled class="bacClass" v-model="record.paramValue2"
                                                @input="inputs5_2(record)" />
                                        </div>
                                    </template>
                                    <template #paramValue3="{ record }">
                                        <div style="width:100%">
                                            <a-input disabled class="bacClass" v-model="record.paramValue3"
                                                @input="inputs5_2(record)" />
                                        </div>
                                    </template>
                                    <template #paramValue4="{ record }">
                                        <div style="width:100%">
                                            <a-input disabled class="bacClass" v-model="record.paramValue4"
                                                @input="inputs5_2(record)" />
                                        </div>
                                    </template>
                                    <template #paramValue5="{ record }">
                                        <div style="width:100%">
                                            <a-input disabled class="bacClass" v-model="record.paramValue5"
                                                @input="inputs5_2(record)" />
                                        </div>
                                    </template>
                                    <template #paramValue6="{ record }">
                                        <div style="width:100%">
                                            <a-input disabled class="bacClass" v-model="record.paramValue6"
                                                @input="inputs5_2(record)" />
                                        </div>
                                    </template>
                                    <template #paramValue7="{ record }">
                                        <div style="width:100%">
                                            <a-input disabled class="bacClass" v-model="record.paramValue7"
                                                @input="inputs5_2(record)" />
                                        </div>
                                    </template>
                                    <template #paramValue8="{ record }">
                                        <div style="width:100%">
                                            <a-input disabled class="bacClass" v-model="record.paramValue8"
                                                @input="inputs5_2(record)" />
                                        </div>
                                    </template>
                                    <template #paramValue9="{ record }">
                                        <div style="width:100%">
                                            <a-input disabled class="bacClass" v-model="record.paramValue9"
                                                @input="inputs5_2(record)" />
                                        </div>
                                    </template>
                                    <template #paramValue10="{ record }">
                                        <div style="width:100%">
                                            <a-input disabled class="bacClass" v-model="record.paramValue10"
                                                @input="inputs5_2(record)" />
                                        </div>
                                    </template>
                                    <template #remark="{ record }">
                                        <div style="width:100%">
                                            <a-input disabled @input="inputs5_2(record)" class="bacClass"
                                                v-model="record.remark" />
                                        </div>
                                    </template>
                                </a-table>
                            </div>
                        </a-tab-pane>
                        <a-tab-pane title="客户要求" :key="7">
                            <a-row :gutter="16">
                                <a-col :span="4">
                                    <a-form-item label="测试标准">
                                        <a-select popup-container="html"  disabled class="bacClass" :loading="loading" :allowClear="true"
                                            @search="handleSearchKH_1" v-model="objectKH.testStandard"
                                            :filter-option="false" allow-search @focus="focusSelKH_1">
                                            <a-option v-for="item in pageData.nameList7_1"
                                                :value="item['verifyStandard']">{{
                                                    item['verifyStandard']
                                                }}</a-option>
                                        </a-select>
                                    </a-form-item>
                                </a-col>
                                <a-col :span="4">
                                    <a-form-item label="胶管名称">
                                        <a-select popup-container="html"  disabled class="bacClass" :loading="loading" :allowClear="true"
                                            @search="handleSearchKH_2" v-model="objectKH.rubberSac" :filter-option="false"
                                            allow-search @focus="focusSelKH_2">
                                            <a-option v-for="item in pageData.nameList7_2"
                                                :value="item['rubberhoseName']">{{
                                                    item['rubberhoseName']
                                                }}</a-option>
                                        </a-select>
                                    </a-form-item>
                                </a-col>
                                <a-col :span="4">
                                    <a-form-item label="胶带重量">
                                        <a-input-number disabled class="bacClass" v-model="objectKH.tapesWeight" />
                                    </a-form-item>
                                </a-col>
                            </a-row>
                            <a-table stripe :bordered="{ wrapper: true, cell: true }" :columns="tableColumns7"
                                :loading="table.tableLoading" :data="pageData.cfList7" :rowKey="rowKey" size="mini">
                                <template #itemName="{ record }" class="onlyNo1">
                                    <div style="width:100%;"><a-select popup-container="html"  disabled :loading="loading" @search="handleSearch7"
                                            v-model="record.itemName" :filter-option="false" allow-search allow-clear
                                            @focus="focusSel7" @change="changeCf7(record)" class="bacClass">
                                            <a-option v-for="item in pageData.nameList7" :value="item['classify']">{{
                                                item['classify']
                                            }}</a-option>
                                        </a-select>
                                    </div>
                                </template>
                                <template #paramValue="{ record }">
                                    <div style="width:100%">
                                        <a-input disabled v-model="record.paramValue" />
                                    </div>

                                </template>
                                <template #unit="{ record }">
                                    <div style="width:100%">
                                        <a-input disabled v-model="record.unit" />
                                    </div>
                                </template>
                                <template #requireClass="{ record }">
                                    <div style="width:100%">
                                        <a-input disabled v-model="record.requireClass" />
                                    </div>
                                </template>
                            </a-table>
                        </a-tab-pane>
                        <a-tab-pane title="其他信息" :key="8">
                            <a-row :gutter="24">
                                <a-col :span="8">
                                    <a-form-item label="毛坯门幅">
                                        <a-input disabled class="bacClass" v-model="objectQT.blankWidth"></a-input>
                                    </a-form-item>
                                </a-col>
                                <a-col :span="8">
                                    <a-form-item label="毛坯克重">
                                        <a-input-number disabled class="bacClass"
                                            v-model="objectQT.blankWeight"></a-input-number>
                                    </a-form-item>
                                </a-col>
                                <a-col :span="8">
                                    <a-form-item label="码重">
                                        <a-input-number disabled class="bacClass"
                                            v-model="objectQT.yardWeight"></a-input-number>
                                    </a-form-item>
                                </a-col>
                            </a-row>
                            <a-row :gutter="24">
                                <a-col :span="8">
                                    <a-form-item label="供应商">
                                        <a-select popup-container="html"  disabled class="bacClass" :loading="loading" :allowClear="true"
                                            @search="handleSearchGYS" v-model="objectQT.supplierName" :filter-option="false"
                                            allow-search @focus="focusSelGYS">
                                            <a-option v-for="item in pageData.nameOpenGYS" :value="item['providerName']">{{
                                                item['providerName']
                                            }}</a-option>
                                        </a-select>
                                    </a-form-item>
                                </a-col>
                                <a-col :span="8">
                                    <a-form-item label="工厂布号">
                                        <a-input disabled class="bacClass" v-model="objectQT.factoryClothCode"></a-input>
                                    </a-form-item>
                                </a-col>
                                <a-col :span="8">
                                    <a-form-item label="总部登记号">
                                        <a-input disabled class="bacClass" v-model="objectQT.headRegisterCode"></a-input>
                                    </a-form-item>
                                </a-col>
                            </a-row>
                            <a-row :gutter="24">
                                <a-col :span="8">
                                    <a-form-item label="总部布号">
                                        <a-input disabled class="bacClass" v-model="objectQT.headClothCode"></a-input>
                                    </a-form-item>
                                </a-col>
                                <a-col :span="8">
                                    <a-form-item label="产出率预警">
                                        <a-input-number disabled class="bacClass"
                                            v-model="objectQT.outputRateWarn"></a-input-number>
                                    </a-form-item>
                                </a-col>
                                <a-col :span="8">
                                    <a-form-item label="产出率目标">
                                        <a-input-number disabled class="bacClass"
                                            v-model="objectQT.outputRateTarget"></a-input-number>
                                    </a-form-item>
                                </a-col>
                            </a-row>
                        </a-tab-pane>

                    </a-tabs>
                </div>

            </div>
        </a-drawer>

        <a-modal :visible="pageData.showAdd5_3" ok-text="确定" @ok="print" :width="1200" cancel-text='关闭'
            @cancel="pageData.showAdd5_3 = false">
            <template #title>
                选择生产流程
            </template>
            <div class="contioner" style="height: 100%;">
                <div :style="{ height: '400px', padding: '10px' }">
                    <AgGridVuesCopys :rowHeight="33" :headerHeight="33" :suppressCopyRowsToClipboard="true" rowSelection="multiple" @grid-ready="gridReady5_2"
                        style="height:100%" :defaultColDef="defaultColDef1" class='ag-theme-alpine'
                        :rowData="tableDataList5_2" :columnDefs="dc5_2" :localeText="localeText1"></AgGridVuesCopys>
                    <paginationCopys :page-size-options="pagingList1" :total="total" show-total show-jumper show-page-size
                        @change="PageSize" @page-size-change="change1" style="justify-content: center"
                        :page-size="pagination.pageSize" :current="pagination.page" />
                </div>
            </div>
        </a-modal>
        <div class="kkk"> </div>
    </pageTabelLayout>
</template>

<script lang="ts">
import { post, get } from "@/api/http";
import {
    useTable,
    useRowKey,
    useTableColumn,
    usePagination,
    useRowSelection,
} from "@/hooks/table";
import { pagingList } from "@/api/paging";
import { localeText } from '@/api/aggridZw'
import { ref, reactive, onMounted, onActivated, onUnmounted, nextTick } from "vue";
import Toolbar from "@/components/Toolbar.vue";
import { Form, Message, Modal, Pagination } from "@arco-design/web-vue";
import { FormInstance } from "@arco-design/web-vue/es/form";
import emitter from "@/hooks/useEventBus";
import validate from "@/hooks/useValidate";
import { baseURL } from '../../../../api/axios.config'
import axios from "axios";
import dayjs from 'dayjs'

import PageTabelLayout from '@/components/pageTabelLayout.vue'
import type { UploadInstance, UploadProps } from 'element-plus'

interface ClothSet {
    id: any;
    serialNumber: number | undefined,
    classify: string | undefined;
    deleteState: any
    remark: string | undefined;
    createName: string | undefined;
    createTime: string | undefined;
    updateName: string | undefined;
    updateTime: string | undefined;
    requireClassify: any,
    registerCode: any,
    optionx: any,
    defaultx: any,
    units: any,
    requireClassifyID: any,
    isIDof: any,
    nameList2: [],
    nameList3: [],
    nameList4: [],
    clothList5: [],
    clothList5_1: [],
    clothList5_2: [],
    clothList5_3: [],
    valuexx: any,
    concentration: any,
    waterRatio: any,
    classifyDescribe: any
    oldID: any
    parameterValues: any
    process: any,
    flowName: any,
    colorDepth: any,
    machineName: any,
    jobType: any,
    dropDownData2_2: any,
    dropDownData2_3: any,
    clientName: any,
    registerDate: any,
    clothCode: any,

    validLarghezza: any
    inch: any
    fabricState: number,
    clientClothCode: any,
    unit: any,
    larghezzaUpperLimit: any,
    larghezzaLowerLimit: any,
    larghezzaAll: any,
    productName: any,
    fabrIcIngredient: any,
    fabrIcType: any,
    fabricWeight: any,
    clothType: any
    grayCode: any
    grayName: any,
    ingredientExplain: any,
    weightUpperLimit: any,
    yarn: any,
    densityC: any,
    densityW: any,
    machineSize: any,
    comeSampleDate: any,
    season: any,
    payItem: any,
    stainType: any
    clothTypeClassify: any,
    expendDate: any,
    clothKindType: any,
    ingredientType: any,
    containSpecialState: any,
    parameters: any,
    adjuvantCode: any,
    adjuvantName: any,
}

export default {
    name: "FabricInformationListDemo",
    setup() {
        const tableDataList5_2 = ref([])
        const dataForm = reactive<ClothSet>({
            id: null,
            serialNumber: 0,
            createTime: "",
            classify: "",
            remark: "",
            updateTime: "",
            updateName: "",
            createName: "",
            deleteState: 0,
            requireClassify: "",
            optionx: "",
            defaultx: "",
            units: "",
            requireClassifyID: "",
            isIDof: '',
            registerCode: '',
            nameList2: [],
            nameList3: [],
            nameList4: [],
            valuexx: '',
            concentration: '',
            waterRatio: '',
            classifyDescribe: '',
            oldID: '',
            parameterValues: '',
            process: '',
            flowName: '',
            clothList5: [],
            clothList5_1: [],
            clothList5_2: [],
            clothList5_3: [],
            colorDepth: '',
            machineName: '',
            jobType: '',
            dropDownData2_2: '',
            dropDownData2_3: '',
            clientName: '',
            registerDate: '',
            clothCode: '',

            validLarghezza: '',
            inch: '',
            fabricState: 0,
            clientClothCode: '',
            unit: '',
            larghezzaUpperLimit: '',
            larghezzaLowerLimit: '',
            larghezzaAll: '',
            productName: '',
            fabrIcIngredient: '',
            fabrIcType: '',
            fabricWeight: '',
            clothType: '',
            grayCode: '',
            grayName: '',
            ingredientExplain: '',
            weightUpperLimit: '',
            yarn: '',
            densityC: '',
            densityW: '',
            machineSize: '',
            comeSampleDate: '',
            season: '',
            payItem: '',
            stainType: '',
            clothTypeClassify: '',
            expendDate: '',
            clothKindType: '',
            ingredientType: '',
            containSpecialState: '',
            parameters: '',
            adjuvantCode: '',
            adjuvantName: '',


        });


        const objectOP = reactive<{
            colorDepth: any,
            cylinderType: any,
            weightLowerLimit: any,
            customName: any,
            registerCode: any,
            registerDate: any,
            validWidth: any,
            inch: any,
            brandName: any,
            clothCode: any,
            fabricState: number,
            customClothCode: any,
            unit: any,
            widthUpperLimit: any,
            widthLowerLimit: any,
            widthAll: any,
            fabricPart: any,
            fabricType: any,
            fabricWeight: any,
            clothType: any,
            grayCode: any,
            partExplain: any,
            weightUpperLimit: any,
            grayName: any,
            yarn: any,
            machineSize: any,
            season: any,
            payItem: any,
            comeSampleDate: any,
            densityC: any,
            densityW: any,
            stainType: any,
            clothKindType: any,
            expendDate: any,
            clothTypeClassify: any,
            partType: any,
            containSpecialState: any,
            remark: any,
            flowName: any,
            id: any,
            deviceTypeName: any,
        }>({
            id: null,
            colorDepth: '',
            cylinderType: null,
            weightLowerLimit: '',
            customName: '',
            registerCode: '',
            registerDate: '',
            validWidth: '',
            inch: '',
            brandName: '',
            clothCode: '',
            fabricState: 0,
            customClothCode: '',
            unit: '',
            widthUpperLimit: '',
            widthLowerLimit: '',
            widthAll: '',
            fabricPart: '',
            fabricType: '',
            fabricWeight: '',
            clothType: '',
            grayCode: '',
            partExplain: '',
            weightUpperLimit: '',
            grayName: '',
            yarn: '',
            machineSize: '',
            season: '',
            payItem: '',
            comeSampleDate: '',
            densityC: '',
            densityW: '',
            stainType: '',
            clothKindType: '',
            expendDate: '',
            clothTypeClassify: '',
            partType: '',
            containSpecialState: '',
            remark: '',
            flowName: '',
            deviceTypeName: '染色机',
        });
        const objectKH = reactive<{
            id: any
            fabricId: any,
            testStandard: any,
            tapesWeight: any,
            rubberSac: any,

            DevFabricRequireDetail: any[],
        }>({
            id: null,
            fabricId: null,
            testStandard: '',
            tapesWeight: null,
            rubberSac: '',

            DevFabricRequireDetail: []
        });
        const objectKH_1 = reactive<{
            itemName: any,
            paramValue: any,
            unit: any,
            requireClass: any,


        }>({
            itemName: '',
            paramValue: '',
            unit: '',
            requireClass: '',


        });
        const dataForm1 = reactive<{
            clothCode: any,
            brandName: any,
            customName: any,
            customClothCode: any,

            clothType: any,
            fabricType: any,
            beginDate: any,
            endDate: any,


        }>({
            clothCode: '',
            brandName: '',
            customName: '',
            customClothCode: '',

            clothType: '',
            fabricType: '',
            beginDate: '',
            endDate: '',


        });
        const objectQT = reactive<{
            fabricId: any,
            blankWidth: any,
            blankWeight: any,
            yardWeight: any,
            supplierName: any,
            factoryClothCode: any,
            headRegisterCode: any,
            headClothCode: any,
            outputRateWarn: any,
            outputRateTarget: any,
            id: any
        }>({
            fabricId: null,
            blankWidth: '',
            blankWeight: 0,
            yardWeight: 0,
            supplierName: '',
            factoryClothCode: '',
            headRegisterCode: '',
            headClothCode: '',
            outputRateWarn: '',
            outputRateTarget: '',
            id: null
        });
        const objectSCLC = reactive<{
            fabricId: any,
            // colorDepth: any,
            deviceTypeId: any,
            deviceTypeName: any,
            normPower: any,
            dyeTypeId: any,
            dyeTypeName: any,
            produceFlowId: any,
            produceFlowCode: any,
            produceFlowName: any,
            DevFabricRouteDetail: any[],
        }>({
            fabricId: null,
            // colorDepth: '',
            deviceTypeId: '',
            deviceTypeName: '',
            // normPower: "染色机",
            normPower: null,
            dyeTypeId: '',
            dyeTypeName: '',
            produceFlowId: '',
            produceFlowCode: '',
            produceFlowName: '',
            DevFabricRouteDetail: [],

        });

        const headerShow = ref<boolean>(true)
        // 未审核查询
        const scrollbar = ref(true)

        function doRefresh() {

            pageData.pageLoading = true

            post({
                url: "/pdm/DevFabricInfo/getPage",
                data: {
                    page: pagination.page,
                    size: pagination.pageSize,
                    clothCode: dataForm1.clothCode,
                    brandName: dataForm1.brandName,
                    customName: dataForm1.customName,
                    customClothCode: dataForm1.customClothCode,
                    clothType: dataForm1.clothType,
                    fabricType: dataForm1.fabricType,
                    beginDate: dataForm1.beginDate,
                    endDate: dataForm1.endDate,

                    auditState: 0,
                    deleteState: 0,
                },
            })
                .then(({ data, code }: any) => {
                    if (code === 200) {

                        table.handleSuccess(data.list);
                        gridOption.value.setRowData(data.list)
                        total.value = data.total;

                    }
                })
                .catch(console.log).finally(() => {
                    pageData.pageLoading = false
                })
        }
        const total1 = ref(10);
        // 已审核查询
        function doRefresh1() {
            pageData.pageLoading = true
            post({
                url: "/pdm/DevFabricInfo/getPage",
                data: {
                    page: pagination1.page,
                    size: pagination1.pageSize,
                    clothCode: dataForm1.clothCode,
                    brandName: dataForm1.brandName,
                    customName: dataForm1.customName,
                    customClothCode: dataForm1.customClothCode,
                    clothType: dataForm1.clothType,
                    fabricType: dataForm1.fabricType,
                    beginDate: dataForm1.beginDate,
                    endDate: dataForm1.endDate,
                    auditState: 1,
                    deleteState: 0,
                },
            })
                .then(({ data, code }: any) => {
                    if (code === 200) {

                        table.handleSuccess(data.list);
                        gridOption1.value.setRowData(data.list)
                        total1.value = data.total;

                    }
                })
                .catch(console.log).finally(() => {
                    pageData.pageLoading = false
                })
        }

        const { selectedRowKeys, onSelectionChange } = useRowSelection();
        const pagination = usePagination(doRefresh);
        const pagination1 = usePagination(doRefresh1);
        const table = useTable();
        const rowKey = useRowKey("id");
        //检验表单是否含有中文的方法
        // const hasChiese = validate.includeChinese;
        const tableColumns = useTableColumn([
            {
                title: "序号",
                key: "id",
                dataIndex: "id",
                width: 150
            },
            {
                title: "登记号",
                key: "registerCode",
                dataIndex: "registerCode",
                width: 150
            },
            {
                title: "布号",
                key: "clothCode",
                dataIndex: "clothCode",
                width: 150
            },
            {
                title: "品名",
                key: "brandName",
                dataIndex: "brandName",
                width: 150,
            },
            {
                title: "布类",
                key: "clothType",
                dataIndex: "clothType",
                width: 150,
            },
            {
                title: "面料类别",
                key: "fabricType",
                dataIndex: "fabricType",
                width: 150,
            },
            {
                title: "客户名称",
                key: "customName",
                dataIndex: "customName",
                width: 150,
            },
            {
                title: "登记日期",
                key: "registerDate",
                dataIndex: "registerDate",
                width: 150
            },
            {
                title: "客户布号",
                key: "customClothCode",
                dataIndex: "customClothCode",
                width: 150
            },
            {
                title: "创建人",
                key: "createName",
                dataIndex: "createName",
                width: 150
            },
            {
                title: "创建时间",
                key: "createTime",
                dataIndex: "createTime",
                width: 150
            },
            {
                title: "最后修改人",
                key: "updateName",
                dataIndex: "updateName",
                width: 150
            },
            {
                title: "最后修改时间",
                key: "updateTime",
                dataIndex: "updateTime",
                width: 150
            },
            {
                title: "操作",
                key: "id",
                dataIndex: "id",
                slotName: "act",
                width: 150, fixed: 'right'
            },
        ]);
        const tableColumns1 = useTableColumn([
            {
                title: "序号",
                key: "id",
                dataIndex: "id",
                width: 150
            },
            {
                title: "登记号",
                key: "registerCode",
                dataIndex: "registerCode",
                width: 150
            },
            {
                title: "布号",
                key: "clothCode",
                dataIndex: "clothCode",
                width: 150
            },
            {
                title: "品名",
                key: "brandName",
                dataIndex: "brandName",
                width: 150,
            },
            {
                title: "布类",
                key: "clothType",
                dataIndex: "clothType",
                width: 150,
            },
            {
                title: "面料类别",
                key: "fabricType",
                dataIndex: "fabricType",
                width: 150,
            },
            {
                title: "客户名称",
                key: "clientName",
                dataIndex: "clientName",
                width: 150,
            },
            {
                title: "登记日期",
                key: "registerDate",
                dataIndex: "registerDate",
                width: 150
            },
            {
                title: "客户布号",
                key: "customClothCode",
                dataIndex: "customClothCode",
                width: 150
            },
            {
                title: "创建人",
                key: "createName",
                dataIndex: "createName",
                width: 150
            },
            {
                title: "创建时间",
                key: "createTime",
                dataIndex: "createTime",
                width: 150
            },
            {
                title: "最后修改人",
                key: "updateName",
                dataIndex: "updateName",
                width: 150
            },
            {
                title: "最后修改时间",
                key: "updateTime",
                dataIndex: "updateTime",
                width: 150
            },
            {
                title: "操作",
                key: "id",
                dataIndex: "id",
                slotName: "act1",
                width: 150, fixed: 'right'
            },

        ]);
        const tableColumns2 = useTableColumn([
            {
                title: "操作",
                key: "del",
                dataIndex: "del",
                slotName: 'del',
                width: 150
            },
            {
                title: "客户色号",
                key: "customColorCode",
                dataIndex: "customColorCode",
                slotName: "customColorCode",
                width: 150
            },
            {
                title: "客户色称",
                key: "customColorName",
                dataIndex: "customColorName",
                slotName: "customColorName",
                width: 150
            },
            {
                title: "撞白",
                key: "contrastWhiteState",
                dataIndex: "contrastWhiteState",
                slotName: "contrastWhiteState",
                width: 150
            },
            {
                title: "增加收费项目",
                key: "addPayItem",
                dataIndex: "addPayItem",
                slotName: "addPayItem",
                width: 150
            },
            {
                title: "减少收费项目",
                key: "minusPayItem",
                dataIndex: "minusPayItem",
                slotName: "minusPayItem",
                width: 150
            },
            {
                title: "染厂色号",
                key: "deyplantColorCode",
                dataIndex: "deyplantColorCode",
                slotName: "deyplantColorCode",
                width: 150
            },
            {
                title: "备注",
                key: "remark",
                dataIndex: "remark",
                slotName: "remark",
                width: 150
            },

            // {
            //     title: "操作",
            //     key: "id",
            //     dataIndex: "id",
            //     slotName: "act",
            //     width: 150, fixed: 'right'
            // },
        ]);
        // 整理参数子表
        const tableColumns3_1 = useTableColumn([
            // {
            //     title: "序号",
            //     key: "requireClassifyID",
            //     dataIndex: "requireClassifyID",
            //     width: 150
            // },

            {
                title: "参数",
                key: "paramName",
                dataIndex: "paramName",
                slotName: "paramName",
                width: 150
            },
            {
                title: "参数值",
                key: "paramValue",
                dataIndex: "paramValue",
                slotName: "paramValue",
                width: 150
            },
            // {
            //     title: "操作",
            //     key: "id",
            //     dataIndex: "id",
            //     slotName: "act4",
            //     width: 300,
            //     fixed: 'right'
            // },

        ]);
        // 整理参数主表
        const tableColumns3 = useTableColumn([
            {
                title: "操作",
                key: "del3",
                dataIndex: "del3",
                slotName: 'del3',
                width: 150
            },
            {
                title: "项目描述",
                key: "itemName",
                dataIndex: "itemName",
                slotName: 'itemName',
                width: 150
            },

            {
                title: "详情",
                key: "act3",
                dataIndex: "act3",
                slotName: "act3",
                width: 150,
            },
        ]);
        const tableColumns4 = useTableColumn([
            {
                title: "操作",
                key: "del4",
                dataIndex: "del4",
                slotName: 'del4',
                width: 150
            },
            {
                title: "工序",
                key: "processName",
                dataIndex: "processName",
                slotName: 'processName',
                width: 150
            },
            {
                title: "水比(KG/L)",
                key: "waterRatio",
                dataIndex: "waterRatio",
                slotName: 'waterRatio',
                width: 150
            },

            {
                title: "详情",
                key: "act4",
                dataIndex: "act4",
                slotName: "act4",
                width: 150, fixed: 'right'
            },
        ])
        const tableColumns4_1 = useTableColumn([
            {
                title: "操作",
                key: "del4_1",
                dataIndex: "del4_1",
                slotName: 'del4_1',
                width: 150
            },
            {
                title: "助剂编号",
                key: "adjuvantCode",
                dataIndex: "adjuvantCode",
                slotName: 'adjuvantCode',
                width: 150
            },
            {
                title: "助剂名称",
                key: "adjuvantName",
                dataIndex: "adjuvantName",
                slotName: 'adjuvantName',
                width: 150
            },
            {
                title: "浓度",
                key: "concentration",
                dataIndex: "concentration",
                slotName: 'concentration',
                width: 150
            },
            {
                title: "浓度单位",
                key: "unit",
                dataIndex: "unit",
                slotName: 'unit',
                width: 150
            },
            // {
            //     title: "操作",
            //     key: "act4_1",
            //     dataIndex: "act4_1",
            //     slotName: "act4_1",
            //     width: 150, fixed: 'right'
            // },
        ])
        const tableColumns5 = useTableColumn([
            {
                title: "操作",
                key: "del5",
                dataIndex: "del5",
                slotName: 'del5',
                width: 150
            },
            {
                title: "颜色深浅",
                key: "colorDepth",
                dataIndex: "colorDepth",
                slotName: 'colorDepth',
                width: 150
            },
            {
                title: "缸型",
                key: "cylinderType",
                dataIndex: "cylinderType",
                slotName: 'cylinderType',
                width: 150
            },
            {
                title: "标准每管落缸匹数",
                key: "normPower",
                dataIndex: "normPower",
                slotName: 'normPower',
                width: 150
            },
            {
                title: "染色类别",
                key: "dyeTypeName",
                dataIndex: "dyeTypeName",
                slotName: 'dyeTypeName',
                width: 150
            },
            // {
            //     title: "工艺单号",
            //     key: "productionCode",
            //     dataIndex: "productionCode",
            //     slotName: 'productionCode',
            //     width: 150
            // },
            // {
            //     title: "生产流程",
            //     key: "flows",
            //     dataIndex: "flows",
            //     slotName: 'flows',
            //     width: 450
            // },
            {
                title: "工艺单号",
                key: "produceFlowCode",
                dataIndex: "produceFlowCode",
                slotName: 'produceFlowCode',
                width: 150
            },
            {
                title: "生产流程",
                key: "produceFlowName",
                dataIndex: "produceFlowName",
                slotName: 'produceFlowName',
                width: 450
            },
            {
                title: "操作",
                key: "act5",
                dataIndex: "act5",
                slotName: "act5",
                width: 150, fixed: 'right'
            },

        ])
        const tableColumns5_1 = useTableColumn([
            // {
            //     title: "序号",
            //     key: "processId",
            //     dataIndex: "processId",
            //     width: 150
            // },
            {
                title: "工序",
                key: "processName",
                dataIndex: "processName",
                slotName: 'processName',
                width: 150
            },
            {
                title: "工序说明",
                key: "processExplain",
                dataIndex: "processExplain",
                slotName: 'processExplain',
                width: 150
            },
            {
                title: "参数一",
                key: "paramValue1",
                dataIndex: "paramValue1",
                slotName: 'paramValue1',
                width: 150
            },
            {
                title: "参数二",
                key: "paramValue2",
                dataIndex: "paramValue2",
                slotName: 'paramValue2',
                width: 150
            },
            {
                title: "参数三",
                key: "paramValue3",
                dataIndex: "paramValue3",
                slotName: 'paramValue3',
                width: 150
            },
            {
                title: "参数四",
                key: "paramValue4",
                dataIndex: "paramValue4",
                slotName: 'paramValue4',
                width: 150
            },
            {
                title: "参数五",
                key: "paramValue5",
                dataIndex: "paramValue5",
                slotName: 'paramValue5',
                width: 150
            },
            {
                title: "参数六",
                key: "paramValue6",
                dataIndex: "paramValue6",
                slotName: 'paramValue6',
                width: 150
            },
            {
                title: "参数七",
                key: "paramValue7",
                dataIndex: "paramValue7",
                slotName: 'paramValue7',
                width: 150
            },
            {
                title: "参数八",
                key: "paramValue8",
                dataIndex: "paramValue8",
                slotName: 'paramValue8',
                width: 150
            },
            {
                title: "参数九",
                key: "paramValue9",
                dataIndex: "paramValue9",
                slotName: 'paramValue9',
                width: 150
            },
            {
                title: "参数十",
                key: "paramValue10",
                dataIndex: "paramValue10",
                slotName: 'paramValue10',
                width: 150
            },
            {
                title: "备注",
                key: "remark",
                dataIndex: "remark",
                slotName: 'remark',
                width: 150
            },

        ])
        const tableColumns6 = useTableColumn([
            // {
            //     title: "序号",
            //     key: "serialNumber",
            //     dataIndex: "serialNumber",
            //     width: 150
            // },
            {
                title: "颜色深浅",
                key: "adjuvantCode",
                dataIndex: "adjuvantCode",
                width: 150
            },
            {
                title: "设备类型",
                key: "adjuvantName",
                dataIndex: "adjuvantName",
                width: 150
            },
            {
                title: "标准每管落缸匹数",
                key: "concentration",
                dataIndex: "concentration",
                width: 150
            },
            {
                title: "染色类别",
                key: "units",
                dataIndex: "units",
                width: 150
            },
            {
                title: "工艺单号",
                key: "units",
                dataIndex: "units",
                width: 150
            },
            {
                title: "生产流程",
                key: "units",
                dataIndex: "units",
                width: 150
            },
            {
                title: "操作",
                key: "id",
                dataIndex: "id",
                slotName: "act6",
                width: 150, fixed: 'right'
            },
        ])
        const tableColumns7 = useTableColumn([
            {
                title: "操作",
                key: "del7",
                dataIndex: "del7",
                slotName: "del7",
                width: 150,
            },
            {
                title: "项目",
                key: "itemName",
                dataIndex: "itemName",
                slotName: "itemName",
                width: 150
            },
            {
                title: "选值",
                key: "paramValue",
                dataIndex: "paramValue",
                slotName: "paramValue",
                width: 150
            },
            {
                title: "单位",
                key: "unit",
                dataIndex: "unit",
                slotName: "unit",
                width: 150
            },
            {
                title: "要求分类",
                key: "requireClass",
                dataIndex: "requireClass",
                slotName: "requireClass",
                width: 150
            },
            // {
            //     title: "测试标准",
            //     key: "units",
            //     dataIndex: "units",
            //     width: 150
            // },
            // {
            //     title: "胶带名称",
            //     key: "units",
            //     dataIndex: "units",
            //     width: 150
            // },
            // {
            //     title: "胶带重量",
            //     key: "units",
            //     dataIndex: "units",
            //     width: 150
            // },

        ])
        const dc5_2 = [
            {
                showRowGroup: 'hide_def',
                "headerName": "",
                "checkboxSelection": true,
                "headerCheckboxSelection": true,
                "pinned": "left",
                "width": 50,
                resizable: false,
                filter: false,
                sortable: false,
                minWidth: 50,
                maxWidth: 50,
                lockPosition: "left",
            },
            {
                headerName: '工艺单号',
                field: 'productionCode',
                width: 150,
            },
            {
                headerName: '生产流程',
                field: 'flows',
                width: 850
            },
        ]
        const scroll = {
            x: 2000,
            y: 200
        };
        const tablediv = ref(null)
        const pageData = reactive<{
            clothList: ClothSet[]
            showAdd: boolean,
            showAdd1: boolean,
            showAdd2: boolean,
            showAdd3: boolean,
            showAdd31: boolean,
            showAdd4: boolean,
            showAdd9: boolean,
            showAdd8: boolean,
            showAdd5_3: boolean,
            sideTitle: string,
            dropDownData: any
            pageLoading: boolean,
            theight: number,
            tablediv: any,
            rHeight: number | undefined,
            dropDownData1: any,
            nameList3: any[],
            showAdd4_1: boolean
            showAdd4_2: boolean
            showAdd5: boolean
            showAdd6: boolean
            nameList6_1: [],
            nameList6_2: [],
            nameList6_3: [],
            nameList2_1: [],
            nameList4_1: [],
            nameList7_2: [],
            nameList7_1: [],
            nameList7: [],
            nameOpen1: [],
            nameOpen2: [],
            nameOpen3: [],
            nameOpen4: [],
            nameOpen5: [],
            nameOpen6: [],
            nameOpen7: [],
            nameOpen8: [],
            nameOpen9: [],
            nameOpenKHMC: [],
            nameOpenDW: [],
            nameOpenGYS: [],
            nameOpenSH: [],
            dutymachineState: number | undefined,
            cfList2: any[],
            cfList3: any[],
            cfList3_1: any[],
            cfList4: any[],
            // cfList4.sonInfo:any[],
            cfList4_1: any[],
            cfList5: any[],
            cfList5_1: any[],
            cfList6: any[],
            cfList7: any[],
            cfList8: any[],
            file: any[],
        }>({
            cfList2: [],
            cfList3: [],
            cfList3_1: [],
            cfList4: [
                {
                    "processName": '',
                    "waterRatio": "",
                    "act4": "",
                    sonInfo: [
                        {
                            "adjuvantCode": "",
                            "adjuvantName": "",
                            "concentration": null,
                            "unit": ""
                        }
                    ]
                }
            ],
            cfList4_1: [],
            cfList5: [],
            cfList5_1: [],
            cfList6: [],
            cfList7: [],
            cfList8: [],
            clothList: [],
            showAdd: false,
            showAdd1: false,
            showAdd2: false,
            showAdd3: false,
            showAdd31: false,
            showAdd4: false,
            showAdd5: false,
            showAdd9: false,
            showAdd8: false,
            showAdd5_3: false,
            sideTitle: "新增面料信息",
            dropDownData: "",
            pageLoading: false,
            theight: 0,
            tablediv: null,
            rHeight: 0,
            dropDownData1: "",
            nameList3: [],
            showAdd4_1: false,
            showAdd4_2: false,
            showAdd6: false,
            nameList6_1: [],
            nameList6_2: [],
            nameList6_3: [],
            nameList2_1: [],
            nameList4_1: [],
            nameList7_2: [],
            nameList7_1: [],
            nameList7: [],
            nameOpen1: [],
            nameOpen2: [],
            nameOpen3: [],
            nameOpen4: [],
            nameOpen5: [],
            nameOpen6: [],
            nameOpen7: [],
            nameOpen8: [],
            nameOpen9: [],
            nameOpenKHMC: [],
            nameOpenDW: [],
            nameOpenGYS: [],
            nameOpenSH: [],
            dutymachineState: 0,
            file: []
        });
        const indedata = ref(0)
        //下拉框得到焦点
        const focusSel = () => {
            selCxAll({ seasonName: "" })
        }
        //下拉数据
        const options = ref<any>(pageData.clothList);
        const loading = ref(false);
        const handleSearch = (value: any) => {
            if (value) {
                const ob = { seasonName: value }
                loading.value = true;
                selCxAll(ob);
                options.value = pageData.clothList;
                loading.value = false;
            } else {
                options.value = []
            }
        };

        //下拉框查询
        function selCxAll(val: any) {
            post({
                url: "/pdm/seasonSet/getFieldValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    pageData.clothList = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }

        onMounted(() => {
            // 第一个页面需要在刚进入就调用一次  切换tap时也需要调用
            doRefresh();
            // selCxAll({});
            // 切换tap到本页面执行的方法
            // emitter.on("DevelopSampleRegistrationListDemo", () => {
            //     // selCxAll({});
            //     doRefresh();
            // });
            pageData.rHeight = document.getElementsByClassName("main-section")[0]?.clientHeight
            //弹出层的高
            if (pageData.rHeight !== undefined) {
                pageData.rHeight = pageData.rHeight - 100;
            }
        });
        let cxbl = ""
        // 未审核分页查询
        const selectHandler = () => {
            pagination.page = 1
            // cxbl = pageData.dropDownData
            if (pageData.dropDownData !== '') {
                doRefresh();
            } else {
                doRefresh();
            }

        }
        // 已审核分页查询
        const selectHandler1 = () => {
            pagination.page = 1
            // cxbl = pageData.dropDownData
            if (pageData.dropDownData !== '') {
                doRefresh1();
            } else {
                doRefresh1();
            }

        }


        const queryData = reactive({
            clothType: "",
        });


        // 新增
        const formRef = ref<FormInstance>();
        const sideOk = () => {
            if (objectOP.payItem != '') {
                objectOP.payItem = objectOP.payItem.join()
            } else {
                objectOP.payItem = ''
            }
            // console.log('让叶归根，让花开花1');
            // formRef.value?.validate().then((err) => {
            //     console.log('让叶归根，让花开花2');
            //     if (!err) {
            //         console.log('让叶归根，让花开花3');
            formRef.value?.validate().then((err) => {
                if (!err) {
                    if (pageData.sideTitle === "新增面料信息") {
                        var listOpen1: any = []
                        pageData.cfList3.map((o: any) => {
                            if (o.itemName) {
                                o.cc.map((i: any) => {
                                    listOpen1.push({
                                        "itemId": i.itemId,
                                        "itemName": i.itemName,
                                        "paramName": i.paramName,
                                        "paramValue": i.paramValue,
                                    })
                                })
                            }
                        })
                        // console.log(listOpen1, pageData.cfList3_1, '此刻的她是否像我一样背井离乡');

                        var listOpen: any = []
                        pageData.cfList4.map((o: any) => {
                            o.sonInfo.map((i: any) => {
                                listOpen.push({
                                    "processId": o.processId,
                                    "processName": o.processName,
                                    "waterRatio": parseFloat(o.waterRatio),
                                    "adjuvantCode": i.adjuvantCode,
                                    "adjuvantName": i.adjuvantName,
                                    "concentration": parseFloat(i.concentration),
                                    "unit": i.unit
                                    // "unit": ''
                                })
                            })
                        })
                        // pageData.cfList5_1.filter((o: any) => {
                        //     o.id = ''
                        // })
                        // objectSCLC = pageData.cfList5


                        // objectKH.DevFabricRequireDetail = pageData.cfList7
                        // console.log(objectKH, '没人心疼的滋味');
                        // console.log(objectSCLC, '不能给我的请完整给他');
                        // if (pageData.cfList2['contrastWhiteState'] == 1) {
                        //     pageData.cfList2['contrastWhiteState'] = true
                        // } else {
                        //     pageData.cfList2['contrastWhiteState'] = false
                        // }
                        // if (objectOP.fabricState = '') {
                        //     objectOP.fabricState = null
                        // } else {
                        //     objectOP.fabricState = parseFloat(Number(objectOP.fabricState).toFixed(2))
                        // }
                        if (objectKH.tapesWeight = '') {
                            objectKH.tapesWeight = null
                        } else {
                            objectKH.tapesWeight = parseFloat(Number(objectKH.tapesWeight).toFixed(2))
                        }
                        // console.log(pageData.cfList2, objectOP.fabricState, objectOP.containSpecialState, '如果当时勇敢的在一起会不会不同结局');

                        pageData.cfList2 = outpage(pageData.cfList2, 'customColorCode')
                        listOpen1 = outpage(listOpen1, 'itemName')
                        // listOpen = outpage(listOpen, 'processName')
                        objectKH.DevFabricRequireDetail = outpage(pageData.cfList7, 'itemName')
                        // console.log(pageData.cfList2['contrastWhiteState'], '我们的故事并不算美丽');
                        // console.log(DevFabricFile.value, '却如此难以忘记');

                        post({
                            url: "/pdm/DevFabricInfo/insertList",
                            data: {
                                //TOP表单
                                DevFabricInfo: objectOP,
                                // 客户颜色
                                DevFabricColor: pageData.cfList2,
                                // 整理参数
                                DevFabricSortParameter: listOpen1,
                                // 整理助剂
                                DevFabricSortAdjuvant: listOpen,
                                // 工艺路线
                                // DevFabricRoute: objectSCLC,
                                DevFabricRoute: pageData.cfList5,
                                // 客户要求
                                DevFabricRequire: objectKH,
                                // 其他信息
                                DevFabricOther: objectQT,
                                // filtArrayList: filtArrayList.value
                                DevFabricFile: DevFabricFile.value

                            }
                        })
                            .then((res: any) => {
                                if (res.code === 200) {
                                    formRef.value?.resetFields();

                                    pageData.showAdd8 = false;

                                    Message.success({
                                        content: "新增成功",
                                        duration: 5000,
                                    });
                                    doRefresh();
                                } else {
                                    Message.error({
                                        content: res.message,
                                        duration: 5000,
                                    });
                                }

                            });

                    } else {
                        // if (pageData.cfList2['contrastWhiteState'] == 1) {
                        //     pageData.cfList2['contrastWhiteState'] = true
                        // } else {
                        //     pageData.cfList2['contrastWhiteState'] = false
                        // }
                        let ids: any = gridOption.value.getSelectedRows().map((item: any) => {
                            return item.id
                        })
                        objectOP.id = ids[0]
                        pageData.cfList2.map((item: any) => { return { ...item, fabricId: ids[0] }; });
                        pageData.cfList3.map((item: any) => { return { ...item, fabricId: ids[0] }; });
                        pageData.cfList4.map((item: any) => { return { ...item, fabricId: ids[0] }; });
                        pageData.cfList5.map((item: any) => { return { ...item, fabricId: ids[0] }; });
                        // objectSCLC.DevFabricRouteDetail = pageData.cfList5
                        // console.log(objectSCLC.DevFabricRouteDetail, '红酥手，黄藤酒，满城春色宫墙柳');
                        let listOpen: any = []
                        pageData.cfList4.map((o: any) => {
                            o.sonInfo.map((i: any) => {
                                listOpen.push({
                                    "processId": o.processId,
                                    "processName": o.processName,
                                    "waterRatio": parseFloat(o.waterRatio),
                                    "adjuvantCode": i.adjuvantCode,
                                    "adjuvantName": i.adjuvantName,
                                    "concentration": parseFloat(i.concentration),
                                    "unit": i.unit
                                    // "unit": ''
                                })
                            })
                        })

                        let listOpen1: any = []
                        // console.log(pageData.cfList3);

                        pageData.cfList3.map((o: any) => {
                            if (o.itemName) {

                                o.cc.map((i: any) => {
                                    listOpen1.push({
                                        "itemId": i.itemId,
                                        "itemName": i.itemName,
                                        "paramName": i.paramName,
                                        "paramValue": i.paramValue,
                                    })
                                })
                            }
                        })
                        // console.log(pageData.cfList3, listOpen1, '在爱的回归线有期待终会有相见');
                        pageData.cfList2 = outpage(pageData.cfList2, 'customColorCode')
                        listOpen1 = outpage(listOpen1, 'itemName')
                        listOpen = outpage(listOpen, 'processName')
                        objectKH.DevFabricRequireDetail = outpage(pageData.cfList7, 'itemName')
                        // console.log(objectKH.DevFabricRequireDetail, '让我再听一遍最美的那一句')
                        console.log(DevFabricFile.value, '却如此难以忘记');
                        post({
                            url: "/pdm/DevFabricInfo/updateList",
                            data: {
                                //TOP表单
                                DevFabricInfo: objectOP,
                                // 客户颜色
                                DevFabricColor: pageData.cfList2,
                                // 整理参数
                                DevFabricSortParameter: listOpen1,
                                // 整理助剂
                                DevFabricSortAdjuvant: listOpen,
                                // 工艺路线
                                DevFabricRoute: pageData.cfList5,
                                // 客户要求
                                DevFabricRequire: objectKH,
                                // 其他信息
                                DevFabricOther: objectQT,
                                DevFabricFile: DevFabricFile.value
                            }
                        }).then((res: any) => {
                            if (res.code === 200) {
                                formRef.value?.resetFields();
                                pageData.showAdd8 = false;

                                Message.success({
                                    content: "修改成功",
                                    duration: 5000,
                                });
                                doRefresh();
                            } else {
                                Message.error({
                                    content: res.message,
                                    duration: 5000,
                                });
                            }

                        });
                    }
                }
            });
        };
        // 未审核页面审核方法
        const audits = () => {
            if (gridOption.value.getSelectedRows().length === 0) {
                Message.error('请先勾选')
                return;
            }
            Modal.confirm({
                title: '系统提示',
                content: '是否审核此订单',
                onOk() {
                    post({
                        url: "/pdm/DevFabricInfo/setAudit",
                        // data: auditStateId,
                        data: gridOption.value.getSelectedRows().map((item: any) => {
                            return { id: item.id, auditState: 1 }
                        })
                    }).then((res: any) => {
                        if (res.code === 200) {
                            doRefresh();
                            Message.success('审核通过')
                            // selectedRowKeys.value = []
                        } else {
                            Message.error(res.message)
                        }
                    })
                }
            })
        }
        // 已经审核页面反审方法
        const counters = () => {
            if (gridOption1.value.getSelectedRows().length === 0) {
                Message.error('请先勾选')
                return;
            }
            Modal.confirm({
                title: '系统提示',
                content: '是否审核此订单',
                onOk() {
                    post({
                        url: "/pdm/DevFabricInfo/setAudit",
                        // data: auditStateId,
                        data: gridOption1.value.getSelectedRows().map((item: any) => {
                            return { id: item.id, auditState: 0 }
                        })
                    }).then((res: any) => {
                        if (res.code === 200) {
                            doRefresh1();
                            Message.success('审核通过')
                            // selectedRowKeys.value = []
                        } else {
                            Message.error(res.message)
                        }
                    })
                }
            })
        }
        // 删除事件
        const deleteHandler = () => {
            if (gridOption.value.getSelectedRows().length === 0) {
                Message.error('请先勾选')
                return;
            }
            Modal.confirm({
                title: "系统提示",
                content: "确认删除选中的数据?",
                onOk() {
                    post({
                        url: "/pdm/DevFabricInfo/deleteList",
                        data: gridOption.value.getSelectedRows().map((o: any) => { return o.id })
                    }).then(({ code, data, message }: any) => {
                        if (code === 200) {
                            Message.success({
                                content: "删除成功",
                                duration: 5000,
                            });

                            pagination.page = 1
                            doRefresh();

                        } else {
                            Message.error({
                                content: '删除失败',
                                duration: 5000,
                            });
                        }

                    });
                },
            });
        };
        // 修改事件
        const editHandler = (record: any) => {
            for (var key in record) {
                objectOP[key] = record[key]
            }


            let obY = record.id
            doRefresh_1(obY)
            doRefresh_2(obY)
            doRefresh_3(obY)
            doRefresh_4(obY)
            doRefresh_5(obY)
            doRefresh_51(obY)
            doRefresh_6(obY)
            doRefresh_61(obY)
            doRefresh_7(obY)
            // objectOP.customName = record.customName
            // objectOP.registerCode = record.registerCode
            // objectOP.registerDate = record.registerDate
            // objectOP.validWidth = record.validWidth
            // objectOP.inch = record.inch
            // objectOP.brandName = record.brandName
            // objectOP.clothCode = record.clothCode
            // objectOP.fabricState = record.fabricState
            // // console.log(record.fabricState, '像手腕上散发的香水味');
            // objectOP.customClothCode = record.customClothCode
            // objectOP.unit = record.unit
            // objectOP.widthUpperLimit = record.widthUpperLimit
            // objectOP.widthLowerLimit = record.widthLowerLimit
            // objectOP.widthAll = record.widthAll
            // objectOP.fabricPart = record.fabricPart
            // objectOP.fabricType = record.fabricType
            // objectOP.fabricWeight = record.fabricWeight
            // objectOP.clothType = record.clothType
            // objectOP.grayCode = record.grayCode
            // objectOP.partExplain = record.partExplain
            // objectOP.weightUpperLimit = record.weightUpperLimit
            // objectOP.grayName = record.grayName
            // objectOP.yarn = record.yarn
            // objectOP.machineSize = record.machineSize
            // objectOP.season = record.season
            // objectOP.payItem = record.payItem
            // objectOP.comeSampleDate = record.comeSampleDate
            // objectOP.densityC = record.densityC
            // objectOP.densityW = record.densityW
            // objectOP.stainType = record.stainType
            // objectOP.clothKindType = record.clothKindType
            // objectOP.expendDate = record.expendDate
            // objectOP.clothTypeClassify = record.clothTypeClassify
            // objectOP.partType = record.partType
            // objectOP.containSpecialState = record.containSpecialState
            // objectOP.remark = record.remark
            // objectOP.flowName = record.flowName
            // objectOP.id = record.id
            // console.log(objectOP.payItem, '被偏爱的都有恃无恐');
            objectOP.payItem = objectOP.payItem.split(",")
            // console.log(objectOP.payItem, '得不到的永远在骚动');
            // 页签每次进入新增页面自动添加一行空数据
            pageData.cfList2.push({ "customColorCode": "", "customColorName": "", "contrastWhiteState": "", "addPayItem": "", "minusPayItem": "", "deyplantColorCode": "", "remark": "" })
            pageData.cfList3.push({ "itemName": '', "act3": "" })
            pageData.cfList4.push({
                "processName": '',
                "waterRatio": "",
                "act4": "",
                "sonInfo": [
                    {
                        "adjuvantCode": "",
                        "adjuvantName": "",
                        "concentration": null,
                        "unit": ""
                    }
                ]
            },)
            pageData.cfList7.push({ "itemName": '', "paramValue": "", "unit": "", "requireClass": "" })
            pageData.sideTitle = '修改面料信息'
            pageData.showAdd8 = true
        };
        // 详情事件
        const editHandler1 = (record: any) => {
            for (var key in record) {
                objectOP[key] = record[key]
            }
            if (objectOP.payItem != '') {
                objectOP.payItem = objectOP.payItem.split(",")
            } else {
                objectOP.payItem = ''
            }
            let obY = record.id
            doRefresh_1(obY)
            doRefresh_2(obY)
            doRefresh_3(obY)
            doRefresh_4(obY)
            doRefresh_5(obY)
            doRefresh_51(obY)
            doRefresh_6(obY)
            doRefresh_61(obY)
            doRefresh_7(obY)
            // objectOP.customName = record.customName
            // objectOP.registerCode = record.registerCode
            // objectOP.registerDate = record.registerDate
            // objectOP.validWidth = record.validWidth
            // objectOP.inch = record.inch
            // objectOP.brandName = record.brandName
            // objectOP.clothCode = record.clothCode
            // objectOP.fabricState = record.fabricState
            // objectOP.customClothCode = record.customClothCode
            // objectOP.unit = record.unit
            // objectOP.widthUpperLimit = record.widthUpperLimit
            // objectOP.widthLowerLimit = record.widthLowerLimit
            // objectOP.widthAll = record.widthAll
            // objectOP.fabricPart = record.fabricPart
            // objectOP.fabricType = record.fabricType
            // objectOP.fabricWeight = record.fabricWeight
            // objectOP.clothType = record.clothType
            // objectOP.grayCode = record.grayCode
            // objectOP.partExplain = record.partExplain
            // objectOP.weightUpperLimit = record.weightUpperLimit
            // objectOP.grayName = record.grayName
            // objectOP.yarn = record.yarn
            // objectOP.machineSize = record.machineSize
            // objectOP.season = record.season
            // objectOP.payItem = record.payItem
            // objectOP.comeSampleDate = record.comeSampleDate
            // objectOP.densityC = record.densityC
            // objectOP.densityW = record.densityW
            // objectOP.stainType = record.stainType
            // objectOP.clothKindType = record.clothKindType
            // objectOP.expendDate = record.expendDate
            // objectOP.clothTypeClassify = record.clothTypeClassify
            // objectOP.partType = record.partType
            // objectOP.containSpecialState = record.containSpecialState
            // objectOP.remark = record.remark
            // objectOP.flowName = record.flowName
            // objectOP.id = record.id
            pageData.sideTitle = '面料信息详情'
            pageData.showAdd9 = true
        };
        // 附件页签查询
        // 客户颜色页签查询
        function doRefresh_2(val: any) {
            pageData.pageLoading = true
            post({
                url: "/pdm/DevFabricColor/getList",
                data: {
                    fabricId: val
                },
            })
                .then(({ data, code }: any) => {
                    if (code === 200) {

                        pageData.cfList2 = data

                        // console.log(pageData.cfList2, '如果爱懂了沉默的代价');


                    }
                })
                .catch(console.log).finally(() => {
                    pageData.pageLoading = false
                })
        }
        // 整理参数页签查询
        function doRefresh_3(val: any) {
            pageData.pageLoading = true
            post({
                url: "/pdm/DevFabricSortParameter/getList",
                data: {
                    fabricId: val
                },
            })
                .then(({ data, code }: any) => {
                    if (code === 200) {
                        pageData.cfList3 = []
                        let arr1: any = []
                        let newArr: any
                        newArr = []
                        data.map((item: any) => {
                            arr1.push(item.itemName)
                            newArr.includes(item.itemName) ?
                                newArr :
                                newArr[item.itemName] = {
                                    itemName: item.itemName,
                                    itemId: item.itemId,
                                    id: item.id,
                                    cc: []
                                }
                        })
                        // console.log(newArr)
                        data.map((iten1: any) => {
                            newArr[iten1.itemName].cc.push(
                                {
                                    itemName: iten1.itemName,
                                    itemId: iten1.itemId,
                                    id: iten1.id,
                                    paramName: iten1.paramName,
                                    paramValue: iten1.paramValue
                                }
                            )
                            // newArr.map((item: any) => {
                            //     if (item.itemName == iten1.itemName) {
                            //         item.cc.push(
                            //             {
                            //                 itemName: iten1.itemName,
                            //                 itemId: iten1.itemId,
                            //                 id: iten1.id,
                            //                 paramName: iten1.paramName,
                            //                 paramValue: iten1.paramValue
                            //             }
                            //         )
                            //     }

                            // })
                        })
                        Object.values(newArr).forEach((item: any) => {
                            pageData.cfList3.push(item)
                            arr.value[item.itemId] = item.cc
                            pageData.cfList3_1 = Object.values(newArr)[0].cc
                            console.log(item)
                        })
                        console.log(arr.value)
                    }
                })
                .catch(console.log).finally(() => {
                    pageData.pageLoading = false
                })
        }
        // 整理助剂页签查询
        function doRefresh_4(val: any) {
            pageData.pageLoading = true
            post({
                url: "/pdm/DevFabricSortAdjuvant/getList",
                data: {
                    fabricId: val
                },
            })
                .then(({ data, code }: any) => {
                    if (code === 200) {
                        // listOpen = data
                        // pageData.cfList4 = data
                        let arr1: any = []
                        let newArr: any
                        newArr = []
                        data.map((item: any) => {
                            arr1.push(item.processName)
                            newArr.includes(item.processName) ?
                                newArr :
                                newArr[item.processName] = {
                                    processName: item.processName,
                                    waterRatio: item.waterRatio,
                                    id: item.id,
                                    sonInfo: []
                                }
                        })
                        data.map((iten1: any) => {
                            newArr[iten1.processName].sonInfo.push(
                                {
                                    "adjuvantCode": iten1.adjuvantCode,
                                    "adjuvantName": iten1.adjuvantName,
                                    "concentration": iten1.concentration,
                                    "unit": iten1.unit
                                }
                            )
                        })
                        pageData.cfList4 = Object.values(newArr)
                        // pageData.cfList4 = Object.values(newArr)[0].sonInfo
                        indedata.value = 0
                        console.log(newArr)
                        console.log(arr1)
                        // pageData.cfList4.push({
                        //     "processName": '',
                        //     "waterRatio": "",
                        //     "act4": "",
                        //     sonInfo: [
                        //         {
                        //             "adjuvantCode": "",
                        //             "adjuvantName": "",
                        //             "concentration": null,
                        //             "unit": ""
                        //         }
                        //     ]
                        // },)
                        // pageData.cfList4.map((item: any) => {
                        //     item.sonInfo = [
                        //         {
                        //             "adjuvantCode": item.adjuvantCode,
                        //             "adjuvantName": item.adjuvantName,
                        //             "concentration": item.concentration,
                        //             "unit": item.unit
                        //         }
                        //     ]
                        // })
                        // console.log(pageData.cfList4[indedata.value])
                    }
                })
                .catch(console.log).finally(() => {
                    pageData.pageLoading = false
                })
        }

        // 工艺路线页签查询
        function doRefresh_5(val: any) {
            pageData.pageLoading = true
            post({
                url: "/pdm/DevFabricRoute/getList",
                data: {
                    fabricId: val
                },
            })
                .then(({ data, code }: any) => {
                    if (code === 200) {
                        pageData.cfList5 = data
                        pageData.cfList5.map((item: any) => {
                            item.booleanOPen = true
                        })
                    }
                })
                .catch(console.log).finally(() => {
                    pageData.pageLoading = false
                })
        }
        // 工艺路线明细页签查询
        function doRefresh_51(val: any) {
            pageData.pageLoading = true
            post({
                url: "/pdm/DevFabricRouteDetail/getList",
                data: {
                    fabricId: val
                },
            })
                .then(({ data, code }: any) => {
                    if (code === 200) {
                        objectSCLC.DevFabricRouteDetail = data

                    }
                })
                .catch(console.log).finally(() => {
                    pageData.pageLoading = false
                })
        }
        // 客户要求页签查询
        function doRefresh_6(val: any) {
            pageData.pageLoading = true
            post({
                url: "/pdm/DevFabricRequire/getList",
                data: {
                    fabricId: val
                },
            })
                .then(({ data, code }: any) => {
                    if (code === 200) {
                        // pageData.cfList7 = data
                        objectKH.rubberSac = data[0].rubberSac
                        objectKH.fabricId = data[0].fabricId
                        objectKH.testStandard = data[0].testStandard
                        objectKH.tapesWeight = data[0].tapesWeight
                        objectKH.id = data[0].id

                    }
                })
                .catch(console.log).finally(() => {
                    pageData.pageLoading = false
                })
        }
        // 客户要求明细页签查询
        function doRefresh_61(val: any) {
            pageData.pageLoading = true
            post({
                url: "/pdm/DevFabricRequireDetail/getList",
                data: {
                    fabricId: val
                },
            })
                .then(({ data, code }: any) => {
                    if (code === 200) {
                        // objectSCLC = data
                        pageData.cfList7 = data
                    }
                })
                .catch(console.log).finally(() => {
                    pageData.pageLoading = false
                })
        }
        // 其他要求页签查询
        function doRefresh_7(val: any) {
            pageData.pageLoading = true
            post({
                url: "/pdm/DevFabricOther/getList",
                data: {
                    fabricId: val
                },
            })
                .then(({ data, code }: any) => {
                    if (code === 200) {
                        objectQT.blankWidth = data[0].blankWidth
                        objectQT.blankWeight = data[0].blankWeight
                        objectQT.yardWeight = data[0].yardWeight
                        objectQT.supplierName = data[0].supplierName
                        objectQT.factoryClothCode = data[0].factoryClothCode
                        objectQT.headRegisterCode = data[0].headRegisterCode
                        objectQT.headClothCode = data[0].headClothCode
                        objectQT.outputRateWarn = data[0].outputRateWarn
                        objectQT.outputRateTarget = data[0].outputRateTarget
                        objectQT.id = data[0].id
                        objectQT.fabricId = data[0].fabricId
                    }
                })
                .catch(console.log).finally(() => {
                    pageData.pageLoading = false
                })
        }






        // const pageData2 = reactive<{
        //     showAdd: boolean;
        //     rHeight: any;
        // }>({
        //     showAdd: false,
        //     rHeight: 0
        // });



        let lengsDs: number = 0
        // 表格准备事件
        const gridOption = ref()
        const gridReady = (params: any) => {
            gridOption.value = params.api
        }
        const gridOption5_2 = ref()
        const gridReady5_2 = (params: any) => {
            gridOption5_2.value = params.api
        }
        const defaultColDef = {
            sortable: true,
            resizable: true,
            filter: true,
            // flex: 1
        }
        let tc: any[] = tableColumns.map((o) => {

            let obj = {
                headerName: o.title,
                field: o.key,
                pinned: o['fixed']
            }
            if (o.slotName === 'act') {
                obj['resizable'] = false
                obj['filter'] = false
                obj['sortable'] = false
                obj["lockPosition"] = "right"

                obj['cellRenderer'] = {
                    template: `<a-space><el-button style="color:#165dff;" @click="a" class="gesture" link>修改</el-button><el-button link style="color:#165dff;" @click="b" class="gesture">详情</el-button><el-tag type="warning" class="gesture">待审核</el-tag></a-space>`,
                    setup(props: any) {
                        const a = () => {
                            editHandler(props.params.data)
                        }
                        const b = () => {
                            editHandler1(props.params.data)
                        }
                        return {
                            a, b, ainfo: props.params.data
                        }
                    }

                }
            }

            return obj
        })
        // 表格准备事件
        const gridOption1 = ref()
        const gridReady1 = (params: any) => {
            gridOption1.value = params.api
        }
        const defaultColDef1 = {
            sortable: true,
            resizable: true,
            filter: true,
            // flex: 1
        }
        let dc: any[] = tableColumns1.map((o) => {

            let obj = {
                headerName: o.title,
                field: o.key,
                pinned: o['fixed']
            }
            if (o.slotName === 'act1') {
                obj['resizable'] = false
                obj['filter'] = false
                obj['sortable'] = false
                obj["lockPosition"] = "right"

                obj['cellRenderer'] = {
                    template: `<a-space><el-button style="color:#165dff;" @click="a" class="gesture" link>详情</el-button><el-tag type="success" class="gesture">已审核</el-tag></a-space>`,
                    setup(props: any) {
                        const a = () => {
                            editHandler1(props.params.data)
                        }

                        return {
                            a, ainfo: props.params.data
                        }
                    }

                }
            }
            return obj
        })
        let a = [{
            showRowGroup: 'hide_def',
            "headerName": "",
            "checkboxSelection": true,
            "headerCheckboxSelection": true,
            "pinned": "left",
            "width": 50,
            resizable: false,
            filter: false,
            sortable: false,
            minWidth: 50,
            maxWidth: 50,
            lockPosition: "left",
        }]
        const total = ref(10);
        const page = ref(1);
        const size = ref(10);
        let isIDs: any = ref(1);
        let isIDss: any = ref(1);
        let id = ref(1);
        function PageSize(val: any) {
            if (isIDs.value == 1) {
                pagination.page = val
                doRefresh();
            } else if (id.value == 2) {
                pagination1.page = val
                doRefresh1();
            }
        }

        function change1(val: any) {
            if (isIDs.value == 1) {
                pagination.pageSize = val
                doRefresh();
            } else {
                pagination1.pageSize = val
                doRefresh1();
            }
        }
        const checkeded = ref<boolean>()
        const localeText1: any = ref(localeText)

        //已处理 未处理tab切换
        const changeTabs = (val: any) => {
            isIDs.value = val
            if (isIDs.value == 1) {
                pageData.dutymachineState = 0;
                doRefresh()
            } else {
                pageData.dutymachineState = 1;
                doRefresh1()
            }
        };
        const changeTabs1 = (val: any) => {
            isIDss.value = val
            if (isIDss.value == 1) {
                pageData.dutymachineState = 0;
                // doRefresh()
            } else {
                pageData.dutymachineState = 1;
                // doRefresh1()
            }
        };























        // 过滤必填数据为空的行数据事件
        const outpage = (item: any, fieldName: any) => {
            let data: any = [];
            // console.log(item, '我知道那些夏天就像青春一样回不来');
            if (item != undefined) {
                item.filter((o: any) => {
                    if (o[fieldName] == '' || o[fieldName] == null || o[fieldName] == undefined) {
                    } else {
                        data.push(o);
                    }
                })
                return data;
            }

        }
        // 新增按钮事件
        const addHandler = () => {
            for (var key in dataForm) {
                if (key == "id") {
                    dataForm[key] = null;
                } else {
                    dataForm[key] = "";
                }
            }
            for (var key in objectOP) {
                if (key == "id") {
                    objectOP[key] = null;

                } else {
                    objectOP[key] = '';
                }
            }
            for (var key in objectSCLC) {
                if (key == "id") {
                    objectSCLC[key] = null;

                } else {
                    objectSCLC[key] = '';
                }
            }
            for (var key in objectKH) {
                if (key == "id") {
                    objectKH[key] = null;

                } else {
                    objectKH[key] = '';
                }
            }
            for (var key in objectQT) {
                if (key == "id") {
                    objectQT[key] = null;

                } else {
                    objectQT[key] = '';
                }
            }
            tableDataList5_2.value = [];
            pageData.cfList2 = [];
            pageData.cfList3_1 = [];
            pageData.cfList3 = [];
            pageData.cfList4 = [];
            pageData.cfList5 = [];
            pageData.cfList5_1 = [];
            pageData.cfList4_1 = [];
            pageData.cfList7 = [];
            arr.value = []
            pageData.sideTitle = "新增面料信息";
            objectOP.registerDate = dayjs().format('YYYY-MM-DD')
            objectOP.deviceTypeName = "染色机"
            objectSCLC.normPower = 13
            pageData.showAdd8 = true;

            // 登记号渲染事件
            post({
                url: "/pdm/DevFabricInfo/getCodeGenerate",
                // data: auditStateId,
                data: {}
            }).then((res: any) => {
                if (res.code === 200) {
                    objectOP.registerCode = res.data
                }
            })
            // 客户要求页签默认数据事件
            post({
                url: "/pdm/RequireClassify/getInList",
                // data: auditStateId,
                data: { "requireClassify": ["功能类", "工艺类"] }
            }).then((res: any) => {
                if (res.code === 200) {
                    res.data.filter((o: any) => {
                        o.id = ''
                    })
                    pageData.cfList7 = res.data
                }
            })
            // 页签每次进入新增页面自动添加一行空数据
            pageData.cfList2.push({ "customColorCode": "", "customColorName": "", "contrastWhiteState": "", "addPayItem": "", "minusPayItem": "", "deyplantColorCode": "", "remark": "" })
            pageData.cfList3.push({ "itemName": '', "act3": "" })
            pageData.cfList4.push({
                "processName": '',
                "waterRatio": "",
                "act4": "",
                sonInfo: [
                    {
                        "adjuvantCode": "",
                        "adjuvantName": "",
                        "concentration": null,
                        "unit": ""
                    }
                ]
            },)
            pageData.cfList7.push({ "itemName": '', "paramValue": "", "unit": "", "requireClass": "" })
        };

        // 整理参数子表数据修改事件
        const arr = ref({})
        function inputs(val: any) {
            // console.log(val);
            val.status = true
            arr.value[val.itemId] = pageData.cfList3_1
            // console.log(arr.value)
        }
        // 整理参数主表详情事件
        function xiangqing(val: any) {
            if (val.itemName == '') {
                Message.error({
                    content: "查询失败！",
                    duration: 5000,
                });
            } else {
                doRefresh3(val)
            }

        }
        // 整理参数子表查询渲染
        function doRefresh3(val: any) {
            console.log(val)
            // selCxAll3({ "classifyDescribe": val })
            pageData.pageLoading = true
            let ids = ''
            nextTick(() => {
                if (pageData.nameList3.length !== 0) {
                    pageData.nameList3.filter((o: any) => {
                        if (o.classifyDescribe == val.itemName) {
                            return ids = o.id
                        }
                    })
                }

                post({
                    url: "/pdm/ParameterClassify/getListId",
                    data: {
                        id: ids !== '' ? ids : val.itemId
                    }
                })
                    .then(({ data, code }: any) => {
                        if (code === 200) {

                            const list = data.list.map(({ parameters, parameterValues, classifyDescribe, parameterClassifyID, ...rest }) => ({ paramName: parameters, paramValue: parameterValues, itemName: classifyDescribe, itemId: parameterClassifyID, ...rest }));

                            // var status = pageData.cfList3_1.some((item) => {
                            //     return item.status && item.parameterClassifyID == ids
                            // })
                            if (pageData.cfList3_1.length == 0) {
                                pageData.cfList3_1 = list;
                            }
                            if (pageData.cfList3_1.length != 0 && ids != pageData.cfList3_1[0].parameterClassifyID) {
                                if (arr.value[ids] || val.itemId) {
                                    pageData.cfList3_1 = arr.value[ids] ? arr.value[ids] : arr.value[val.itemId]
                                } else {
                                    pageData.cfList3_1 = list
                                }
                            }
                            pageData.cfList3.map((item: any) => {
                                if (item.itemName == val.itemName) {
                                    item.cc = pageData.cfList3_1
                                }
                            })
                            // console.log(pageData.cfList3)

                        }
                    })
                    .catch(console.log).finally(() => {
                        pageData.pageLoading = false
                    })
            })

        }
        function xiangqing4(record1: any) {
            // console.log(record1, '你是我一首唱不完的歌');
            // let list = pageData.cfList4.map(function (o: any) {
            //     if (record1.record.processName == o.processName) {
            //         return o.id
            //     }
            // })
            // console.log(record1.record.processName, list, pageData.cfList4, '我为你唱一曲如游丝的气息');

            const { rowIndex } = record1
            indedata.value = rowIndex
            // indedata.value = list.value


        }

        tc = a.concat(tc)
        dc = a.concat(dc)

        // 颜色表格新增收费项目下拉框
        const focusSel2_2 = () => {
            selCxAll2_2({ "charges": "" });
        }
        //下拉数据
        const options2_2 = ref<any>(dataForm.nameList2);
        const loading2_2 = ref(false);
        const handleSearch2_2 = (value: any) => {
            if (value) {
                const ob = { charges: value, deleteState: 0 }
                loading2_2.value = true;
                selCxAll2_2(ob);
                options2_2.value = dataForm.nameList2;
                loading2_2.value = false;
            } else {
                options2_2.value = []
            }
        };
        //下拉框查询
        function selCxAll2_2(val: any) {
            post({
                url: "/pdm/chargeProject/getFieldValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    // console.log(data);
                    let dataList: any = [];
                    data.forEach(function (o: any) {
                        dataList.push(o["charges"])
                    });
                    dataForm.nameList2 = dataList;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }
        // 整理参数主表新增项目描述下拉数据
        const focusSel3 = () => {
            selCxAll3({ "classifyDescribe": "" });
        }
        const options3 = ref<any>(pageData.nameList3);
        const loading3 = ref(false);
        const handleSearch3 = (value: any) => {
            if (value) {
                const ob = { classifyDescribe: value, deleteState: 0 }
                loading.value = true;
                selCxAll3(ob);
                options3.value = pageData.nameList3;
                loading3.value = false;
            } else {
                options3.value = []
            }
        };
        function selCxAll3(val: any) {
            post({
                url: "pdm/ParameterClassify/getFieldValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    console.log(data)
                    pageData.nameList3 = data;

                    // dataForm.oldID = pageData.nameList3.forEach((o: any) => { if (o.classifyDescribe = dataForm.classifyDescribe) { return o.id } })
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }
        function xmms() {
            post({
                url: "pdm/ParameterClassify/getFieldValue",
                data: { "classifyDescribe": "" }
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    // pageData.nameList3 = data;
                    // data.map(function(o:any){
                    //     pageData.cfList3.push(o.classifyDescribe)
                    // })


                }
            });
        }
        // 整理助剂工序下拉框
        const focusSel4 = () => {
            selCxAll4({ "processName": {} });
        }
        //下拉数据
        const options4 = ref<any>(dataForm.nameList4);
        const loading4 = ref(false);
        const handleSearch4 = (value: any) => {
            if (value) {
                const ob = { processName: {} }
                loading4.value = true;
                selCxAll4(ob);
                options4.value = dataForm.nameList4;
                loading4.value = false;
            } else {
                options4.value = []
            }
        };
        //下拉框查询
        function selCxAll4(val: any) {
            post({
                url: "/pdm/worksectionWorkprocedure/select",
                data: {}
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    // console.log(data);
                    // let dataList: any = [];
                    // data.forEach(function (o: any) {
                    //     dataList.push(o["processName"])
                    // });
                    dataForm.nameList4 = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }


        // TOP生产流程下拉数据
        const focusSelLC = () => {
            selCxAllLC({ "flowName": "" });
            // selCxAllLC();
        }
        const optionsLC = ref<any>(dataForm.clothList5);
        const loadingLC = ref(false);
        const handleSearchLC = (value: any) => {
            if (value) {
                const ob = { flowName: value, deleteState: 0 }
                loading.value = true;
                selCxAllLC(ob);
                optionsLC.value = dataForm.clothList5;
                loadingLC.value = false;
            } else {
                optionsLC.value = []
            }
        };
        function selCxAllLC(val: any) {
            // function selCxAllLC() {
            post({
                url: "/pdm/ProductProcess/getList",
                data: {}
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    dataForm.clothList5 = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }
        function changeLC(val: any) {
            dataForm.clothList5.filter((o: any) => {
                if (o.flows == objectSCLC.produceFlowName) {
                    objectSCLC.produceFlowCode = o.productionCode
                    objectSCLC.produceFlowId = o.id
                }
            })
            post({
                url: "/pdm/ProductProcessSon/getList",
                data: { productProcessID: objectSCLC.produceFlowId }
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    pageData.cfList5 = data;
                    pageData.cfList5.filter((o: any) => {
                        return o.id = undefined
                    })
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }

        // TOP颜色深浅下拉数据
        const focusSelLC_1 = () => {
            selCxAllLC_1({ "shade": "" });
            // selCxAllLC_1();
        }
        const optionsLC_1 = ref<any>(dataForm.clothList5_1);
        const loadingLC_1 = ref(false);
        const handleSearchLC_1 = (value: any) => {
            if (value) {
                const ob = { shade: value, deleteState: 0 }
                loadingLC_1.value = true;
                selCxAllLC_1(ob);
                optionsLC_1.value = dataForm.clothList5_1;
                loadingLC_1.value = false;
            } else {
                optionsLC_1.value = []
            }
        };
        function selCxAllLC_1(val: any) {
            // function selCxAllLC() {
            post({
                url: "/pdm/shade/getFieldValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    dataForm.clothList5_1 = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }

        // TOP设备类型下拉数据
        const focusSelLC_2 = () => {
            selCxAllLC_2({ "typeName": "" });
            // selCxAllLC();
        }
        const optionsLC_2 = ref<any>(dataForm.clothList5_2);
        const loadingLC_2 = ref(false);
        const handleSearchLC_2 = (value: any) => {
            if (value) {
                const ob = { typeName: value, deleteState: 0 }
                loadingLC_2.value = true;
                selCxAllLC(ob);
                optionsLC_2.value = dataForm.clothList5_2;
                loadingLC_2.value = false;
            } else {
                optionsLC_2.value = []
            }
        };
        function selCxAllLC_2(val: any) {
            // function selCxAllLC() {
            post({
                url: "/aps/dwMachineType/getFieldValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    dataForm.clothList5_2 = data;
                    dataForm.clothList5_2.filter((o: any) => {
                        if (objectSCLC.deviceTypeName == o.typeName) {
                            return objectSCLC.deviceTypeId = o.id
                        }
                    })
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }

        // TOP染色类别下拉数据
        const focusSelLC_3 = () => {
            selCxAllLC_3({ "jobType": "" });
            // selCxAllLC();
        }
        const optionsLC_3 = ref<any>(dataForm.clothList5_3);
        const loadingLC_3 = ref(false);
        const handleSearchLC_3 = (value: any) => {
            if (value) {
                const ob = { jobType: value, deleteState: 0 }
                loadingLC_3.value = true;
                selCxAllLC_3(ob);
                optionsLC_3.value = dataForm.clothList5_3;
                loadingLC_3.value = false;
            } else {
                optionsLC_3.value = []
            }
        };
        function selCxAllLC_3(val: any) {
            // function selCxAllLC() {
            post({
                url: "/pdm/JobType/getFieldValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    dataForm.clothList5_3 = data;
                    dataForm.clothList5_3.filter((o: any) => {
                        if (objectSCLC.dyeTypeName == o.jobType) {
                            return objectSCLC.dyeTypeId = o.id
                        }
                    })
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }

        // 颜色深浅下拉数据
        const focusSel6_1 = () => {
            selCxAllLC({ "colorDepth": "" });
        }
        const options6_1 = ref<any>(pageData.nameList6_1);
        const loading6_1 = ref(false);
        const handleSearch6_1 = (value: any) => {
            if (value) {
                const ob = { colorDepth: value, deleteState: 0 }
                loading.value = true;
                selCxAll6_1(ob);
                options6_1.value = pageData.nameList6_1;
                loading6_1.value = false;
            } else {
                options6_1.value = []
            }
        };
        function selCxAll6_1(val: any) {
            post({
                url: "/pdm/colorDepth/getFieldValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    pageData.nameList6_1 = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }


        // 机器设备下拉数据
        const focusSel6_2 = () => {
            selCxAll6_2({ "machineName": "" });
        }
        const options6_2 = ref<any>(pageData.nameList6_2);
        const loading6_2 = ref(false);
        const handleSearch6_2 = (value: any) => {
            if (value) {
                const ob = { machineName: value, deleteState: 0 }
                loading6_2.value = true;
                selCxAll6_2(ob);
                options6_2.value = pageData.nameList6_2;
                loading6_2.value = false;
            } else {
                options6_2.value = []
            }
        };
        function selCxAll6_2(val: any) {
            post({
                url: "/aps/dwMachine/getFieldValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    pageData.nameList6_2 = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }


        // TOP生产流程下拉数据
        const focusSel6_3 = () => {
            selCxAllLC({ "jobType": "" });
        }
        const options6_3 = ref<any>(pageData.nameList6_3);
        const loading6_3 = ref(false);
        const handleSearch6_3 = (value: any) => {
            if (value) {
                const ob = { jobType: value, deleteState: 0 }
                loading6_3.value = true;
                selCxAll6_3(ob);
                options6_3.value = pageData.nameList6_3;
                loading6_3.value = false;
            } else {
                options6_3.value = []
            }
        };
        function selCxAll6_3(val: any) {
            post({
                url: "pdm/JobType/getFieldValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    pageData.nameList6_3 = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }

        // 助剂编号下拉数据
        const focusSel4_1 = () => {
            selCxAll4_1({ "materialCode": "", auditState: 1 });
        }
        const options4_1 = ref<any>(pageData.nameList4_1);
        const loading4_1 = ref(false);
        const handleSearch4_1 = (value: any) => {
            if (value) {
                const ob = { materialCode: value, auditState: 1 }
                loading4_1.value = true;
                selCxAll4_1(ob);
                options4_1.value = pageData.nameList4_1;
                loading4_1.value = false;
            } else {
                options4_1.value = []
            }
        };
        function selCxAll4_1(val: any) {
            post({
                url: "dwPurchase/MaterialInfo/getFieldValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    pageData.nameList4_1 = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }
        // function change4_1(val: any) {
        //     post({
        //         url: "/dwPurchase/MaterialInfo/getList",
        //         data: { "materialCode": val }
        //     }).then(({ data, code }: any) => {
        //         if (code === 200) {
        //             data.value.filter(function (o: any) {
        //                 if (o.materialCode == val) {
        //                     dataForm.adjuvantName = data[0].materialName;
        //                     dataForm.unit = data[0].unit;
        //                 }
        //                 // console.log(data.value, o.materialCode);

        //             })

        //         } else {
        //             Message.error({
        //                 content: "查询失败！",
        //                 duration: 5000,
        //             });
        //         }
        //     });
        // }

        // 测试标准模糊下拉框下拉数据
        const focusSelKH_1 = () => {
            selCxAllKH_1({ "verifyStandard": "" });
        }
        const optionsKH_1 = ref<any>(pageData.nameList7_1);
        const loadingKH_1 = ref(false);
        const handleSearchKH_1 = (value: any) => {
            if (value) {
                const ob = { verifyStandard: value, deleteState: 0 }
                loadingKH_1.value = true;
                selCxAllKH_1(ob);
                optionsKH_1.value = pageData.nameList7_1;
                loadingKH_1.value = false;
            } else {
                optionsKH_1.value = []
            }
        };
        function selCxAllKH_1(val: any) {
            post({
                url: "/pdm/VerifyStandard/getFieldValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    pageData.nameList7_1 = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }

        // 胶管名称模糊下拉框下拉数据
        const focusSelKH_2 = () => {
            selCxAllKH_2({ "rubberhoseName": "" });
        }
        const optionsKH_2 = ref<any>(pageData.nameList7_2);
        const loadingKH_2 = ref(false);
        const handleSearchKH_2 = (value: any) => {
            if (value) {
                const ob = { rubberhoseName: value, deleteState: 0 }
                loadingKH_2.value = true;
                selCxAll4_1(ob);
                optionsKH_2.value = pageData.nameList7_2;
                loadingKH_2.value = false;
            } else {
                optionsKH_2.value = []
            }
        };
        function selCxAllKH_2(val: any) {
            post({
                url: "/pdm/rubberhoseSet/getFieldValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    pageData.nameList7_2 = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }

        // 客户要求项目下拉框下拉数据
        const focusSel7 = () => {
            selCxAll7({ "classify": "" });
        }
        const options7 = ref<any>(pageData.nameList7);
        const loading7 = ref(false);
        const handleSearch7 = (value: any) => {
            if (value) {
                const ob = { classify: value, deleteState: 0 }
                loading7.value = true;
                selCxAll7(ob);
                options7.value = pageData.nameList7;
                loading7.value = false;
            } else {
                options7.value = []
            }
        };
        function selCxAll7(val: any) {
            post({
                url: "/pdm/RequireClassify/getList",
                data: {}
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    pageData.nameList7 = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }
        const listport: any = ref([])
        function change7(val: any) {
            let list7: any = []
            pageData.nameList7.map((o: any) => {
                if (o.classify == val) {
                    list7 = o.id;
                }
            })
            // console.log(list7);

            post({
                url: "/pdm/RequireClassifySon/getList",
                data: { "requireClassifyID": list7 }
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    data.filter((o: any) => {
                        if (o.classify == val) {
                            objectKH_1.paramValue = o.chooseValue;
                            objectKH_1.unit = o.unit;
                            // objectKH_1.requireClass = o.askClassify;

                        }
                    })

                    // listport.value = [...objectKH.askInfo,{...objectKH_1}]
                    // objectKH.askInfo = [...listport.value]
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }

        // TOP面料类别下拉框下拉数据
        const focusSelopen1 = () => {
            selCxAllopen1({ "fabricCategory": "" });
        }
        const optionsopen1 = ref<any>(pageData.nameOpen1);
        const loadingopen1 = ref(false);
        const handleSearchopen1 = (value: any) => {
            if (value) {
                const ob = { fabricCategory: value, deleteState: 0 }
                loadingopen1.value = true;
                selCxAllopen1(ob);
                optionsopen1.value = pageData.nameOpen1;
                loadingopen1.value = false;
            } else {
                optionsopen1.value = []
            }
        };
        function selCxAllopen1(val: any) {
            post({
                url: "/pdm/fabricType/getFieldValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    pageData.nameOpen1 = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }

        // TOP布类下拉框下拉数据
        const focusSelopen2 = () => {
            selCxAllopen2({ "mercery": "" });
        }
        const optionsopen2 = ref<any>(pageData.nameOpen2);
        const loadingopen2 = ref(false);
        const handleSearchopen2 = (value: any) => {
            if (value) {
                const ob = { mercery: value, deleteState: 0 }
                loadingopen2.value = true;
                selCxAllopen2(ob);
                optionsopen2.value = pageData.nameOpen2;
                loadingopen2.value = false;
            } else {
                optionsopen2.value = []
            }
        };
        function selCxAllopen2(val: any) {
            post({
                url: "/pdm/ClothSet/getFieldValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    pageData.nameOpen2 = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }

        // TOP坯布名称下拉框下拉数据
        const focusSelopen3 = () => {
            selCxAllopen3({ "grayFabricName": "" });
        }
        const optionsopen3 = ref<any>(pageData.nameOpen3);
        const loadingopen3 = ref(false);
        const handleSearchopen3 = (value: any) => {
            if (value) {
                const ob = { grayFabricName: value, deleteState: 0 }
                loadingopen3.value = true;
                selCxAllopen3(ob);
                optionsopen3.value = pageData.nameOpen3;
                loadingopen3.value = false;
            } else {
                optionsopen3.value = []
            }
        };
        function selCxAllopen3(val: any) {
            post({
                url: "/product/pdGreyInformation/getFieldValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    pageData.nameOpen3 = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }

        // TOP坯布编号下拉框下拉数据
        const focusSelopen4 = () => {
            selCxAllopen4({ "greyCode": "", auditState: 1 });
        }
        const optionsopen4 = ref<any>(pageData.nameOpen4);
        const loadingopen4 = ref(false);
        const handleSearchopen4 = (value: any) => {
            if (value) {
                const ob = { greyCode: value, auditState: 1 }
                loadingopen4.value = true;
                selCxAllopen4(ob);
                optionsopen4.value = pageData.nameOpen4;
                loadingopen4.value = false;
            } else {
                optionsopen4.value = []
            }
        };
        function selCxAllopen4(val: any) {
            post({
                url: "/product/pdGreyInformation/getFieldValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    pageData.nameOpen4 = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }
        function changeopen4(val: any) {
            post({
                url: "/product/pdGreyInformation/selectpdGreyInformation",
                data: { "greyCode": val }
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    data.filter((o: any) => {
                        if (o.greyCode == val) {
                            objectOP.grayName = o.grayFabricName;
                            objectOP.machineSize = o.dimensionFigure;
                            objectOP.yarn = o.yarnCountName
                        }
                    })

                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }

        // TOP布种类别下拉框下拉数据
        const focusSelopen5 = () => {
            selCxAllopen5({ "FabricsCategory": "" });
        }
        const optionsopen5 = ref<any>(pageData.nameOpen5);
        const loadingopen5 = ref(false);
        const handleSearchopen5 = (value: any) => {
            if (value) {
                const ob = { FabricsCategory: value, deleteState: 0 }
                loadingopen5.value = true;
                selCxAllopen5(ob);
                optionsopen5.value = pageData.nameOpen5;
                loadingopen5.value = false;
            } else {
                optionsopen5.value = []
            }
        };
        function selCxAllopen5(val: any) {
            post({
                url: "/pdm/ClothCategory/getFieldValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    pageData.nameOpen5 = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }

        // TOP成分分类下拉框下拉数据
        const focusSelopen6 = () => {
            selCxAllopen6({ "partTypeName": "" });
        }
        const optionsopen6 = ref<any>(pageData.nameOpen6);
        const loadingopen6 = ref(false);
        const handleSearchopen6 = (value: any) => {
            if (value) {
                const ob = { partTypeName: value, deleteState: 0 }
                loadingopen6.value = true;
                selCxAllopen6(ob);
                optionsopen6.value = pageData.nameOpen6;
                loadingopen6.value = false;
            } else {
                optionsopen6.value = []
            }
        };
        function selCxAllopen6(val: any) {
            post({
                url: "/pdm/partType/getFieldValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    pageData.nameOpen6 = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }

        // TOP收费项目下拉框下拉数据
        const focusSelopen7 = () => {
            selCxAllopen7({ "charges": "" });
        }
        const optionsopen7 = ref<any>(pageData.nameOpen7);
        const loadingopen7 = ref(false);
        const handleSearchopen7 = (value: any) => {
            if (value) {
                const ob = { charges: value, deleteState: 0 }
                loadingopen7.value = true;
                selCxAllopen7(ob);
                optionsopen7.value = pageData.nameOpen7;
                loadingopen7.value = false;
            } else {
                optionsopen7.value = []
            }
        };
        function selCxAllopen7(val: any) {
            post({
                url: "/pdm/chargeProject/getFieldValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    pageData.nameOpen7 = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }

        // TOP染色类型下拉框下拉数据
        const focusSelopen8 = () => {
            selCxAllopen8({ "jobType": "" });
        }
        const optionsopen8 = ref<any>(pageData.nameOpen8);
        const loadingopen8 = ref(false);
        const handleSearchopen8 = (value: any) => {
            if (value) {
                const ob = { jobType: value, deleteState: 0 }
                loadingopen8.value = true;
                selCxAllopen8(ob);
                optionsopen8.value = pageData.nameOpen8;
                loadingopen8.value = false;
            } else {
                optionsopen8.value = []
            }
        };
        function selCxAllopen8(val: any) {
            post({
                url: "/pdm/JobType/getFieldValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    pageData.nameOpen8 = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }

        // TOP布种分类下拉框下拉数据
        const focusSelopen9 = () => {
            selCxAllopen9({ "FabricsClassify": "" });
        }
        const optionsopen9 = ref<any>(pageData.nameOpen9);
        const loadingopen9 = ref(false);
        const handleSearchopen9 = (value: any) => {
            if (value) {
                const ob = { FabricsClassify: value, deleteState: 0 }
                loadingopen9.value = true;
                selCxAllopen9(ob);
                optionsopen9.value = pageData.nameOpen9;
                loadingopen9.value = false;
            } else {
                optionsopen9.value = []
            }
        };
        function selCxAllopen9(val: any) {
            post({
                url: "/pdm/ClothClass/getFieldValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    pageData.nameOpen9 = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }

        // TOP客户名称下拉框下拉数据
        const focusSelKHMC = () => {
            selCxAllKHMC({ "customName": "" });
        }
        const optionsKHMC = ref<any>(pageData.nameOpenKHMC);
        const loadingKHMC = ref(false);
        const handleSearchKHMC = (value: any) => {
            if (value) {
                const ob = { customName: value, deleteState: 0 }
                loadingKHMC.value = true;
                selCxAllKHMC(ob);
                optionsKHMC.value = pageData.nameOpenKHMC;
                loadingKHMC.value = false;
            } else {
                optionsKHMC.value = []
            }
        };
        function selCxAllKHMC(val: any) {
            post({
                url: "/aps/custom/getDropValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    pageData.nameOpenKHMC = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }

        // TOP单位下拉框下拉数据
        const focusSelDW = () => {
            selCxAllDW({ "codeType": "" });
        }
        const optionsDW = ref<any>(pageData.nameOpenDW);
        const loadingDW = ref(false);
        const handleSearchDW = (value: any) => {
            if (value) {
                const ob = { codeType: value, deleteState: 0 }
                loadingDW.value = true;
                selCxAllDW(ob);
                optionsDW.value = pageData.nameOpenDW;
                loadingDW.value = false;
            } else {
                optionsDW.value = []
            }
        };
        function selCxAllDW(val: any) {
            post({
                url: "/dict/dictTypeDetail/getList",
                data: { codeType: 17 }
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    pageData.nameOpenDW = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }
        // 其他信息-供应商下拉框下拉数据
        const focusSelGYS = () => {
            selCxAllGYS({ "providerName": "" });
        }
        const optionsGYS = ref<any>(pageData.nameOpenGYS);
        const loadingGYS = ref(false);
        const handleSearchGYS = (value: any) => {
            if (value) {
                const ob = { providerName: value, deleteState: 0 }
                loadingGYS.value = true;
                selCxAllGYS(ob);
                optionsGYS.value = pageData.nameOpenGYS;
                loadingGYS.value = false;
            } else {
                optionsGYS.value = []
            }
        };
        function selCxAllGYS(val: any) {
            post({
                url: "/dwPurchase/Provider/getFieldValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    pageData.nameOpenGYS = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }
        // 客户颜色-染厂色号下拉框下拉数据
        const focusSelSH = () => {
            selCxAllSH({ "colourNumber": "" });
        }
        const optionsSH = ref<any>(pageData.nameOpenSH);
        const loadingSH = ref(false);
        const handleSearchSH = (value: any) => {
            if (value) {
                const ob = { colourNumber: value, deleteState: 0 }
                loadingSH.value = true;
                selCxAllSH(ob);
                optionsSH.value = pageData.nameOpenSH;
                loadingSH.value = false;
            } else {
                optionsSH.value = []
            }
        };
        function selCxAllSH(val: any) {
            post({
                url: "/pdm/proofingManage/getFieldValue",
                data: val
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    pageData.nameOpenSH = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }

        const huiche = () => {
            doRefresh();
        }
        let dataForm3 = ref({})
        let dataForm4 = ref({})
        let dataForm4_2 = ref({})
        const pagingList1: any = ref(pagingList)












        // 颜色  删除
        const delRow2 = (record: any) => {
            if (pageData.cfList2.length !== 1) {
                pageData.cfList2 = pageData.cfList2.filter(function (o: any) {
                    return o['customColorCode'] !== record['customColorCode']
                })
            } else {
                Message.warning('最后一条数据，不可删除！')
            }

        }
        const changeCf2 = (record: any) => {
            let count1 = 0;
            let count2 = 0;
            for (let index = 0; index < pageData.cfList2.length; index++) {
                const element = pageData.cfList2[index];
                if (element['customColorCode'] == record['customColorCode']) {
                    count1++
                }
                if (element['customColorCode'] == '') {
                    count2++;
                }
                if (count1 > 1) {
                    Message.warning('此成份已被选择过，请重新选择！')
                    record['customColorCode'] = ""
                    return
                }
            }
            //选择完成份给用户再新增一行
            if (count2 == 0) {
                pageData.cfList2.push({ "customColorCode": "", "customColorName": "", "contrastWhiteState": "", "addPayItem": "", "minusPayItem": "", "deyplantColorCode": "", "remark": "" })

            }
        }

        // 整理参数  删除
        const delRow3 = (record: any) => {
            if (pageData.cfList3.length !== 1) {
                pageData.cfList3 = pageData.cfList3.filter(function (o: any) {
                    return o['itemName'] !== record['itemName']
                })
            } else {
                Message.warning('最后一条数据，不可删除！')
            }

        }
        const changeCf3 = (record: any) => {
            // console.log(record, '111111111111111');
            record.id = pageData.nameList3.filter((o: any) => {
                if (o.classifyDescribe == record.itemName) {
                    return o.id
                }
            })
            let count1 = 0;
            let count2 = 0;
            for (let index = 0; index < pageData.cfList3.length; index++) {
                const element = pageData.cfList3[index];
                if (element['itemName'] == record['itemName']) {
                    count1++
                }
                if (element['itemName'] == '') {
                    count2++;
                }
                if (count1 > 1) {
                    Message.warning('此成份已被选择过，请重新选择！')
                    record['itemName'] = ""
                    return
                }
            }
            //选择完成份给用户再新增一行
            if (count2 == 0) {
                pageData.cfList3.push({ "itemName": "", "act3": "" })

            }
        }

        // 整理助剂主表  删除
        const delRow4 = (record: any) => {
            if (pageData.cfList4.length !== 1) {
                pageData.cfList4 = pageData.cfList4.filter(function (o: any) {
                    return o['processName'] !== record['processName']
                })
            } else {
                Message.warning('最后一条数据，不可删除！')
            }

        }
        const changeCf4 = (record1: any) => {
            // console.log(record1)
            dataForm.nameList4.map((item: any) => {
                if (record1.record.processName == item.processName) {
                    record1.record.processId = item.id
                }
            })
            const { rowIndex, record } = record1
            // console.log(record)
            let count1 = 0;
            let count2 = 0;
            for (let index = 0; index < pageData.cfList4.length; index++) {
                const element = pageData.cfList4[index];
                if (element['processName'] == record['processName']) {
                    count1++
                }
                if (element['processName'] == '') {
                    count2++;
                }
                if (count1 > 1) {
                    Message.warning('此成份已被选择过，请重新选择！')
                    record['processName'] = ""
                    return
                }
            }
            //选择完成份给用户再新增一行
            if (count2 == 0) {
                pageData.cfList4.push(
                    {
                        "processName": '',
                        "waterRatio": "",
                        "act4": "",
                        sonInfo: [
                            {
                                "adjuvantCode": "",
                                "adjuvantName": "",
                                "concentration": null,
                                "unit": ""
                            }
                        ]
                    },
                )
                indedata.value = rowIndex

            }
        }

        // 整理助剂子表  删除
        const delRow4_1 = (record: any) => {
            if (pageData.cfList4[indedata.value].sonInfo.length !== 1) {
                pageData.cfList4[indedata.value].sonInfo = pageData.cfList4[indedata.value].sonInfo.filter(function (o: any) {
                    return o['adjuvantCode'] !== record['adjuvantCode']
                })
            } else {
                Message.warning('最后一条数据，不可删除！')
            }

        }
        const changeCf4_1 = (record: any) => {
            if (pageData.cfList4[0].processName != '') {
                // console.log(record, '我们的故事并不算美丽');
                post({
                    url: "/dwPurchase/MaterialInfo/getList",
                    data: { "materialCode": record.adjuvantCode }
                }).then(({ data, code }: any) => {
                    if (code === 200) {
                        data.map(function (o: any) {
                            if (o.materialCode == record.adjuvantCode) {
                                record.adjuvantName = o.materialName;
                                record.unit = o.unit;
                            }
                        })


                    } else {
                        Message.error({
                            content: "查询失败！",
                            duration: 5000,
                        });
                    }
                });
                let count1 = 0;
                let count2 = 0;
                for (let index = 0; index < pageData.cfList4[indedata.value].sonInfo.length; index++) {
                    const element = pageData.cfList4[indedata.value].sonInfo[index];
                    if (element['adjuvantCode'] == record['adjuvantCode']) {
                        count1++
                    }
                    if (element['adjuvantCode'] == '') {
                        count2++;
                    }
                    if (count1 > 1) {
                        Message.warning('此成份已被选择过，请重新选择！')
                        record['adjuvantCode'] = ""
                        return
                    }
                }
                //选择完成份给用户再新增一行
                if (count2 == 0) {
                    pageData.cfList4[indedata.value].sonInfo.push({
                        "adjuvantCode": "",
                        "adjuvantName": "",
                        "concentration": null,
                        "unit": ""
                    })

                }
            } else {
                pageData.cfList4[indedata.value].sonInfo[0].adjuvantCode = ''
                pageData.cfList4[indedata.value].sonInfo[0].concentration = ''
                Message.error({
                    content: "请先填写左表工序数据！",
                    duration: 5000,
                });
            }


        }

        // 客户要求  删除
        const delRow7 = (record: any) => {
            if (pageData.cfList7.length !== 1) {
                pageData.cfList7 = pageData.cfList7.filter(function (o: any) {
                    return o['itemName'] !== record['itemName']
                })
            } else {
                Message.warning('最后一条数据，不可删除！')
            }

        }
        const changeCf7 = (record: any) => {
            let list7: any = []
            pageData.nameList7.map((o: any) => {
                if (o.classify == record.itemName) {
                    list7 = o.id;
                    record.requireClass = o.requireClassify
                }
            })
            // console.log(record, '谁人能像你一样感动我');
            post({
                url: "/pdm/RequireClassifySon/getList",
                data: { "requireClassifyID": list7 }
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    data.filter((o: any) => {
                        if (o.classify == record.itemName) {
                            record.paramValue = o.chooseValue;
                            record.unit = o.unit;
                            // objectKH_1.requireClass = o.askClassify;
                            // objectKH.askInfo = [...objectKH.askInfo, { ...objectKH_1 }]
                        }
                        // console.log(objectKH, '被伤过的心还能爱谁');

                    })
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
            let count1 = 0;
            let count2 = 0;
            for (let index = 0; index < pageData.cfList7.length; index++) {
                const element = pageData.cfList7[index];
                if (element['itemName'] == record['itemName']) {
                    count1++
                }
                if (element['itemName'] == '') {
                    count2++;
                }
                if (count1 > 1) {
                    Message.warning('此成份已被选择过，请重新选择！')
                    record['itemName'] = ""
                    return
                }
            }
            //选择完成份给用户再新增一行
            if (count2 == 0) {
                pageData.cfList7.push({ "itemName": "", "paramValue": "", "unit": "", "requireClass": "" })

            }
        }


        const baseURLs = ref(baseURL)

        const uploadRef = ref<UploadInstance>()


        const handleRemove: UploadProps['onRemove'] = (uploadFile: any, uploadFiles: any) => {
            console.log(uploadFile, uploadFiles)
            //uploadFiles 这个是删除后所存在的数组数据
            fileList.value = uploadFiles
        }
        const headers = ref({ token: sessionStorage.getItem('USER-TOKEN-KEY') })
        const DevFabricFile = ref([])
        let ob: any = []

        const uploadImgSuccess = (response: any) => {
            // 点击保存按钮后，然后会调一个接口返回加密的文件名，这个时候就是上传成功了，才会调用这个回调函数
            console.log(response, '字符串');
            console.log(fileList.value)
            if (response.code == 200) {
                // ob.push(fileAddress: response.data.data)
                // 直接修改传参数组
                ob.push(response.data.data)


                // 将对象key和值对应push
                // fileList.value.forEach((item: any) => {
                //     if (ob[response.data.data] == undefined) {
                //         ob[response.data.data] = item.name
                //     }
                // })
                // console.log(ob, 'wwwwwwwwww');
                // for (let key in ob) {
                //     let ob1 = {}
                //     ob1['fileAddress'] = key
                //     ob1['fileName'] = ob[key]
                //     DevFabricFile.value.push(ob1)
                // }

                // console.log(response.data.data, ob, 'ooooooooooooooo')

                // 这个判断决定了本方法无论调用多少次只进行最后一次
                if (ob.length === fileList.value.length) {
                    const oa: any = []
                    fileList.value.forEach((item: any, index: number) => {
                        oa.push({
                            // fileAddress: response.data.data,
                            fileAddress: ob[index],
                            fileName: item.name
                        })
                    })

                    DevFabricFile.value = Array.from(new Set(oa));
                    // console.log(fileList.value, ob, DevFabricFile.value, 'gggggggggggg')
                    // uploadRef.value.clearFiles()
                    sideOk()


                }
            } else {
                Message.error(response.message)
            }

        }
        const submitUpload = () => {
            // console.log('444444', fileList.value.length)
            if (fileList.value.length == 0) {
                sideOk()
                console.log('进入非上传保存状态');
            } else {
                // submit()
                if (uploadRef.value) {

                    console.log('上传成功！');
                }

                // uploadRef.value.clearFiles()  //handleStart

                // 这里清空里列表，下面的submit()方法就没进入，没进入就不会调上面那个上传成功的回调函数。
                // 有没有一种可能是先调submit()方法，然后在回调里面用这个清空方法？你试试


                // nextTick(() => {
                //     console.log('333333333333333', uploadRef.value)
                //     // file里面的raw就是File类型，直接复制给组件
                //     uploadRef.value.handleStart(fileList.value) // 重新赋值原来的文件
                // })


                uploadRef.value?.submit()
                console.log('进入要上传保存状态');

            }

        }
        const fileList = ref([]) // 这里定义了这个数组哪里赋值的
        function doRefresh_1(val: any) {
            fileList.value = []
            pageData.pageLoading = true
            post({
                url: "/pdm/DevFabricFile/getList",
                data: { fabricId: val },
            })
                .then(({ data, code }: any) => {
                    if (code === 200) {
                        fileList.value = data.map((item: any) => { return { name: item.fileAddress.match(/\/([^/]+)$/)?.[1] } })
                        // DevFabricFile.value = data.map((item: any) => { return { fileAddress: item.fileAddress.match(/\/([^/]+)$/)?.[1] } })
                        console.log(fileList.value)
                    }
                })
                .catch(console.log).finally(() => {
                    pageData.pageLoading = false
                })
        }
        // let visiblecg = ref(false)
        const clickSC = () => {
            pageData.showAdd5_3 = true
            post({
                url: "/pdm/ProductProcess/getList",
                data: {}
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    tableDataList5_2.value = data;
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });

        }
        const delRow5 = (record: any) => {
            pageData.cfList5 = pageData.cfList5.filter(function (o: any) {
                return o['colorDepth'] !== record['colorDepth']
            })
        }
        const print = () => {
            if (gridOption5_2.value.getSelectedRows().length === 0) {
                Message.error('请先勾选')
            } else {
                gridOption5_2.value.getSelectedRows().forEach((item: any) => {
                    pageData.cfList5.push(item)
                })
                pageData.cfList5.forEach((item: any) => {
                    item.normPower = 13
                    item.productProcessID = item.id,
                        item.produceFlowName = item.flows,
                        item.produceFlowCode = item.productionCode,
                        delete item.id;
                })
            }
            pageData.showAdd5_3 = false
        }
        const xiangqing5 = (res: any) => {
            // console.log(res, '哈哈哈哈');
            post({
                url: "/pdm/ProductProcessSon/getList",
                data: { productProcessID: res.productProcessID }
            }).then(({ data, code }: any) => {
                if (code === 200) {
                    // const hasTrueValue = pageData.cfList5_1.some(item => item.booleanOP === true);
                    // 将后端传输过来的id值删除以便后期传参使用
                    data.forEach((item: any) => {
                        delete item.id
                    })
                    // 在修改子表参数值的时候，只要参数值字段发生变化就会在这个元素数据中塞入一个booleanOP = true的布尔值来区分页签子表数据是来自 后端返回 还是 页面缓存
                    if (res.booleanOP === true) {
                        pageData.cfList5_1 = res.DevFabricRouteDetail
                        // 在修改数据时会调用查询左侧表格数据方法，届时会把拿到的数组中所有元素都塞入一个booleanOPen = true的布尔值，以便于区分页签数据是来自 查询还是新增。 
                    } else if (res.booleanOPen === true) {
                        pageData.cfList5_1 = []
                        // 由于接受到的修改数据是所有子表数据，所以在显示的时候做一个筛选处理，对照主表和子表的关联字段来进行筛选，这个地方有个问题就是没办法做到排序
                        objectSCLC.DevFabricRouteDetail.map((item: any) => {
                            if (item.productProcessID == res.productProcessID) {
                                pageData.cfList5_1.push(item)
                            }
                        })
                        // 将显示数组数据赋值给传参数组
                        if (res.productProcessID == pageData.cfList5_1[0].productProcessID) {
                            res.DevFabricRouteDetail = pageData.cfList5_1
                        }
                        // console.log(pageData.cfList5_1, '这也许是最后一面');
                        // 而下面这个判断则是第一次调用这个接口时，由后端返回的固有数据和部分空白数据；这个地方也就是 固有数据、缓存数据、动态数据 三个都汇聚到一个事件当中，看起来很乱说起来很绕，其实理清楚了逻辑，在不同时候塞入不同的固有值，按照这个固有值去进行一个筛选和判断即可完成这类项操作。
                    } else {
                        pageData.cfList5_1 = data;
                        if (res.productProcessID == pageData.cfList5_1[0].productProcessID) {
                            res.DevFabricRouteDetail = pageData.cfList5_1
                        }
                    }
                    // console.log(pageData.cfList5, '想把你抱进身体里面');
                } else {
                    Message.error({
                        content: "查询失败！",
                        duration: 5000,
                    });
                }
            });
        }
        const inputs5_2 = (res: any) => {
            // console.log(res, '2222222222');
            pageData.cfList5.map((item: any) => {
                if (item.productProcessID == res.productProcessID) {
                    item.DevFabricRouteDetail = pageData.cfList5_1
                    item.booleanOP = true
                }
            })
            // console.log(pageData.cfList5, '2222222222');
        }
        return {
            // visiblecg,
            inputs5_2,
            xiangqing5,
            dc5_2,
            print,
            gridReady5_2,
            delRow5,
            clickSC,
            fileList,
            // filtArrayList,
            uploadImgSuccess,
            headers,
            baseURLs,
            uploadRef,
            submitUpload,
            handleRemove,
            tableColumns5,
            tableColumns5_1,
            changeCf7,
            delRow7,
            tableColumns7,
            changeCf4_1,
            delRow4_1,
            tableColumns4_1,
            changeCf4,
            delRow4,
            tableColumns4,
            pagination1,
            total1,
            tableColumns3_1,
            tableDataList5_2,
            changeCf3,
            delRow3,
            tableColumns3,
            changeCf2,
            delRow2,
            tableColumns2,
            editHandler1,
            xmms,
            outpage,
            xiangqing,
            xiangqing4,
            inputs,
            huiche,
            pagingList1,
            handleSearchopen9,
            focusSelopen9,
            handleSearchopen8,
            focusSelopen8,
            handleSearchopen7,
            focusSelopen7,
            handleSearchopen6,
            focusSelopen6,
            handleSearchopen5,
            focusSelopen5,
            handleSearchopen4,
            focusSelopen4,
            handleSearchopen3,
            focusSelopen3,
            handleSearchopen2,
            focusSelopen2,
            handleSearchopen1,
            focusSelopen1,
            change7,
            changeopen4,
            focusSel7,
            handleSearch7,
            handleSearchKH_2,
            focusSelKH_2,
            handleSearchKH_1,
            focusSelKH_1,
            // change4_1,
            // sideOk4_2,
            // addHandler4_1,
            handleSearch4_1,
            focusSel4_1,
            dataForm4_2,
            dataForm4,
            dataForm3,
            // addHandler2,
            changeTabs1,
            // defaultColDef1_1,
            // gridReady1_1,
            handleSearchLC,
            changeLC,
            focusSelLC,
            handleSearchLC_1,
            focusSelLC_1,
            handleSearchLC_2,
            focusSelLC_2,
            handleSearchLC_3,
            focusSelLC_3,
            handleSearch6_3,
            focusSel6_3,
            handleSearch6_2,
            focusSel6_2,
            handleSearch6_1,
            focusSel6_1,
            focusSel4,
            handleSearch4,
            indedata,
            focusSelKHMC,
            handleSearchKHMC,
            focusSel3,
            handleSearch3,
            focusSelSH,
            handleSearchSH,
            focusSelGYS,
            handleSearchGYS,
            focusSel2_2,
            handleSearch2_2,
            focusSelDW,
            handleSearchDW,
            counters,
            doRefresh1,
            selectHandler1,
            audits,
            isIDs,
            isIDss,
            changeTabs,
            localeText1,
            checkeded,
            gridReady1,
            defaultColDef1,
            dc,
            tableColumns1,
            PageSize,
            change1,
            total,
            tc,
            defaultColDef,
            arr,
            gridReady,
            scroll,
            scrollbar,
            tablediv,
            deleteHandler,
            sideOk,
            formRef,
            dataForm,
            objectOP,
            objectKH,
            objectKH_1,
            objectQT,
            objectSCLC,
            addHandler,
            selectedRowKeys,
            pagination,
            tableColumns,
            table,
            rowKey,
            pageData,
            queryData,
            editHandler,
            selectHandler,
            options,
            loading,
            handleSearch,
            focusSel,
            headerShow,
            dataForm1,

        };
    },
    components: { Toolbar, PageTabelLayout },
};
</script>
<style scoped lang="less">
:deep(.ag-cell) {
    border-right: 1px solid #dde2eb;
}

:deep(.ag-header-cell) {
    border-right: 1px solid #dde2eb;
}

:deep(.ag-cell-value) {
    user-select: initial;
    -moz-user-select: text;
    -ms-user-select: text;
    -webkit-user-select: text;
}

:deep(.chinaNO1) {
    background-color: #f9a633;
    color: #fff;
    margin-left: 30px;
    text-align: center;
    font: 600 18px/18px "";
}

:deep(#onlyNO11) {
    width: 700px !important
}

:deep(.onlyNo1) {
    width: 50% !important
}

:deep(.arco-row-nowrap) {
    margin-top: 10px;
}

.kkk {
    position: fixed;
    z-index: 99999999;
}

:deep(.kkk .arco-select-dropdown) {
    width: 500px !important;
    // color: red
}
</style>
